Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix main.ino Welcome Message, BLE client, OLED client and Console. #56

Merged
merged 5 commits into from
Mar 14, 2020

Conversation

beegee-tokyo
Copy link
Contributor

main.ino Welcome Message, the datagram.message length was wrong. Simplified the creation of the messages and make sure their length is correct.

BleUartClient fixed. Only small change when creating the datagram (double message ID).

OLED client simplified and fixed.

Console needs more testing. Not sure how it works with different line ends (CR/LF versa LF only).

… WebSocketClient. Rewrite of all History functions. Added settings to save username and interface selection (WiFi or BLE) permanent on the device. Added option to switch between WiFi and BLE (default is WiFi) without recompilation.
@paidforby
Copy link
Contributor

Great work @beegee-tokyo ! It looks like this should work. For some reason, I'm having trouble compiling this with platformio. It is suggesting that the LoRaLayer2 and ArduinoJSON libraries cannot be found when compiling the HistoryMemory.cpp and HistorySD.cpp files. See below for the full error message,

Compiling .pio/build/ttgo-lora32-v2/src/history/HistoryMemory.cpp.o
firmware/esp32/history/HistoryMemory.cpp:2:24: fatal error: LoRalayer2.h: No such file or directory

********************************************************************
* Looking for LoRalayer2.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:LoRalayer2.h"
* Web  > https://platformio.org/lib/search?query=header:LoRalayer2.h
*
********************************************************************

compilation terminated.
*** [.pio/build/ttgo-lora32-v2/src/history/HistoryMemory.cpp.o] Error 1
Compiling .pio/build/ttgo-lora32-v2/src/history/HistorySD.cpp.o
firmware/esp32/history/HistorySD.cpp:4:25: fatal error: ArduinoJson.h: No such file or directory

*********************************************************************
* Looking for ArduinoJson.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:ArduinoJson.h"
* Web  > https://platformio.org/lib/search?query=header:ArduinoJson.h
*
*********************************************************************

compilation terminated.
*** [.pio/build/ttgo-lora32-v2/src/history/HistorySD.cpp.o] Error 1

When I check their library registry, I'm able to find the libraries. Obviously, LoRaLayer2 is being pulled in successfully by other parts of the code, not sure why the History files are having trouble.

Any ideas, did you make any changes to your platformio file to get these to compile?

@beegee-tokyo
Copy link
Contributor Author

beegee-tokyo commented Mar 6, 2020

😫 Differences between Linux and Windows 7. In Windows there is no difference between capital and non-capital letters in filenames.

In HistoryMemory.cpp the include should be
#include "LoRaLayer2.h"
instead of
#include "LoRalayer2.h"

and in platformio.ini the lib_deps should say
ArduinoJson
instead of
ArduinoJSON

@paidforby
Copy link
Contributor

I see, that would have never crossed my mind, I'm glad you knew the solution. It is compiling for me now.

This all looks great. The only issue I see is that the OLED client does not appear to be displaying messages to the screen on the ttgo-lora-v2 board. Not sure if this is something you didn't do, or if it is a bug. Unless you know a quick solution, I will merge without this being fixed and we can fix it in a later commit or merge.

Thanks for getting almost everything working.

@beegee-tokyo
Copy link
Contributor Author

OLED client is working fine for me, but I am testing with a display that has a SH1106 chip, not with a SSD1306 chip. But that's just some code lines differences where the include is done and where the display class is declared. The rest is the same. I just looked into the sources and cannot find any reason why it shouldn't work.
Did you test with a ttgo-lora-v1 or with a heltec board as well?

@paidforby
Copy link
Contributor

I have only tested with ttgo-lora-v2. The display is working because the client and route numbers are being updated, the OLED client just doesn't seem to receiving messages from the server, I will dig into it a little more, I also see no apparent why it wouldn't be working.

@paidforby
Copy link
Contributor

I haven't made any progress on resolving my OLED issue, I'm going to go ahead an merge this. I'll make a new commit or merge when I finally solve my issue.

@paidforby paidforby merged commit 66fb7ca into sudomesh:1.0.0-rc.1 Mar 14, 2020
@paidforby paidforby mentioned this pull request Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants