The main use case for this will be to create a custom Heltec WiFi LoRa 32 V3 SG_923 variant, which will be pre-flashed and sent for regulatory approval for retail sale.
Signed-off-by: Andrew Yong <me@ndoo.sg>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* basic identification of TCA9555
* recognise LSM6DS3 on alt address
* keep variant.h changes out of this PR
* 2nd attempt to keep variant.h changes out of this PR
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* fix sleep part 1
* always show wakeup reason in debug log
* fix screen turn on issue
* avoid unnecessary reboot when entering light sleep
* set DIO1 based on radio type
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* started work on pulling in the unphone library and dependencies, to do e.g. power switch management and etc.; currently failing at Adafruit_ImageReader
* now compiles with unphoneLibrary included
* successfully pulled in unphone library to manage power switch and init vibe motor and etc.
doesnt print to serial tho...
* simplified the build a bit; when doing meshtastic do not depend on the MCCI lora libs etc., then also no need to config them via build flags
* version that doesnt trigger brownout
* cleaned up initVariant a little
* note re. GPS
* back to mesh upstream version
* this time we're back to mesh upstream version
* getting LSM6DS3TRC driver installed
* shake to wake works, set threshold quite low may need increasing
* whats the crack with these end of file changes?
* paramatize the wake threshold
* try to get the PR to just include real changes
* got the right config item and also not giving compiler messages
* moved the lib_deps for the LSM6DS3TRC driver from our variant platformio.ini to the main one in root so all boards have it
* stuupid error #define-ing
---------
Co-authored-by: Hamish Cunningham <hamish@gate.ac.uk>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Make ButtonThread instance extern
Previously was a static local instance in setup(). Now declared in ButtonThread.cpp, accessible via extern declaration in ButtonThread.
* Extract attachInterrupt() calls to public method; create matching method for detachInterrupt()
* Change suspension of button interrupts for light-sleep
* Fix declaration for ARCH_PORTDUINO
* Remove LOG_DEBUG used during testing
* Don't assume device has a button..
* Guard entire constructor code
* Don't use BUTTON_PIN with ARCH_PORTDUINO
---------
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
* - map fn+m to mute and unmute the external notification module
- map fn+t to be an alternative for the TAB key
* add whitelist to inputbroker
* (maybe) sweet-talking t-deck into tabbing...
* now for real - back in Kansas
* More fancy mappings
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Update E-Ink display after sending adhoc ping or disable/enable GPS
* Resume display updates when touch button pressed
* Use touch hold as modifier; change double-click behavior for user button
* Fix preprocessor exclusions
* Purge backlight behavior
* Distinguish between 3x and 4x multi-presses
* Touch button considers "Wake screen on tap or motion" user-setting
* Don't assume device has BUTTON_PIN
* Rename misleading method
* Don't save Neighbors to flash when receiving
* Move `shouldSave` to `saveProtoForModule()`
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* remove redundant logic
* Handle special screens for old EInkDisplayClass
* Handle special screens for EInkDynamicDisplay class
* Join an async refresh in progress to avoid skipping screensaver
* attempt trunk fix
* fix Wireless Paper double-clear screen at boot
* log when flooded with "responsive" frames
* show the "resuming" screen when waking from deep-sleep
* rename drawDeepSleepScreen
avoid future confusion with "Screen Paused" screen
* show a screensaver frame when screen off
The frame shown during deep sleep is now also passed through showScreensaverFrames()
* Add macros for E-Ink color values.
OLEDDISPLAY_COLOR is inverted. Result of light-mode on E-Ink vs dark-mode on OLED?
* adapt drawDeepSleepScreen to new screensaver convention
* Mark Wireless Paper V1.1 as having problems with ghosting
Any other issues can be marked in a similar way, then handled in code where relevant
* Change screensaver from fullscreen logo to overlay
* identify "quirks" rather than "problems"
* move async refresh polling from display() to a NotifiedWorkerThread
* Prevent skipping of deep-sleep screen
(Hopefully)
* Redesign screensaver overlay
Now displays short name
* Optimize refresh for different displays
* Support older EInkDisplay class
* Don't assume text alignment
* fix spelling of a quirk macro
(No impact to code, but avoids future issues)
* Handle impossibly unlikely millis() overflow error
Should have just let it go, but here we are..
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Use `alterReceivedProtobuf()` for NeighborInfo and Traceroute
`alterReceived()` should never return NULL
Traceroute should be promiscuous
* Remove extensive logging from NeighborInfo module
* Add MaxNodes to Native
* It compiles...
* Convert nodedb to use new
* Closer but still broken.
* Finally working
* Remove unintended lines
* Don't include a pointer
* Capitalization matters.
* avoid rename in protocol regen
* When trimming the nodeDB, start with a cleanup
* Remove extra cleanupMeshDB() call for now
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Adds configuration option to not build/include the webserver.
* Adds configuration option to not build/include the webserver.
* Keep initApiServer when excluding webserver
* fixes for failed formatting check
* Once more with feeling! Fix for regression.
* Fix includes for ARCH_ESP32
* Format changes from trunk
* Merge updates from origin
* Revert "Format changes from trunk"
This reverts commit 436e631774.
* jeez!
* tryfix proto conflict
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
* (3/3) Add variant for pico with waveshare and GPS hat, utilizing slow clock.
* Not everybody has Serial2
* Trunk
* Push it real gud
* No init
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* More comprehensive MQTT thread and queue guards
* Consolidate logic
* Remove channel check
* Check for map_reporting_enabled as well
* Update message
* Remove channel check from here as well
* One liner
* Start the mqtt thread back up when channels change and we want mqtt
* Set `hop_start` in header to determine how many hops each packet traveled
* Set hopLimit of response according to hops used by request
* Identify neighbors based on `hopStart` and `hopLimit`
* NeighborInfo: get all packets and assume a default broadcast interval
* Add fail-safe in case node in between is running modified firmware
* Add `viaMQTT` and `hopsAway` to NodeInfo
* Replace `HOP_RELIABLE` with hopStart for repeated packet
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Added WebServer/WebServices for Native Linux Meshtastic and web gui
* Fix bug in login functionality
* Added customized config of portdunio.ini with LovyannGFX from marelab repro
* Compile Problem resolved with developer version of LovyanGFX.git
* Compile against dev version
* Fixes to fit into main branch
* Update variant.h, main.cpp, .gitignore, WebServer.cpp, esp32s2.ini, WebServer.h, ContentHandler.cpp, rp2040.ini, nrf52.ini, ContentHelper.cpp, Dockerfile, ContentHandler.h, esp32.ini, stm32wl5e.ini
* Added linux pi std /usr/include dir
* Adding /usr/innclude for Linux compile against native libs that are not hadled by platformio
* Review log level changes & translation
* Update Dockerfile
* Fix Typo & VFS ref. Part1
* Fix Typo & VFS ref.
* Dev Version for ulfius web lib
* Update platformio.ini
* Free VFS path string
* Remove unintended changes
* More unintentional changes
* Make the HTTP server optional on native
* Tune-up for Native web defaults
* Don't modify build system yet
* Remove more unneeded changes
---------
Co-authored-by: marc hammermann <marchammermann@googlemail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
* Portduino multiple logging levels
* Fixes based on GPSFan work
* Fix derped logic
* Correct size field for AID message
* Reformat to add comments, beginning of GPS rework
* Update PM2 message for Neo-6
* Correct ECO mode logic as ECO mode is only for Neo-6
* Cleanup ubx.h add a few more comments
* GPS rework, changes for M8 and stub for M10
* Add VALSET commands for u-blox M10 receivers
* Add VALSET commands for u-blox M10 receivers
tweak M8 commands
add comments for VALSET configuration commands
* Add commands to init M10 receivers,
tweak the M8 init sequence, this is a WIP as there are still some issues during init.
Add M10 version of PMREQ.
* Add wakeup source of uartrx to PMREQ_10
The M10 does not respond to commands when asleep,
may need to do this for the M8 as well
* Enable NMEA messages on USB port.
Normally, it is a good idea to disable messages on unused ports.
Native Linux needs to be able to use GNSS modules connected via
via either serial or USB.
In the future I2C connections may be required, but are not enabled for now.
* Save the config for all u-blox receiver types.
The M10 supports this command in addition to saving using
the VALSET commands for the RAM & BBR layers.
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Refactor EInkDisplay
A lot of variant specific code is merged, with the macros pushed to the respective variant.h files.
"Dynamic Partial" code has been purged, pending a rewrite.
* fix: declare class only if USE_EINK, init all members
* refactor: move macros to platformio.ini
Responds to https://github.com/meshtastic/firmware/pull/3299#issuecomment-1966425926
* fix: EInkDisplay::connect() references old macros
Usage was in a block of variant-specific code, which had been intentionally left untouched.
* fix: remove duplicate macros from variant.h
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* add UI frame to display PaxCounter module data
* only acquire screen when paxcounter is active, i.e. enabled and wifi and ble are both off
* sync font #define with other occurrences in code
* protect screen specific code with #if HAS_SCREEN
* limit upload_speed to 115200 for TLORA_V2_1_16
* fix failing trunk checks; sorry
* Revert "limit upload_speed to 115200 for TLORA_V2_1_16"
This reverts commit 4eb549c5e8.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Experimenting with deep sleep routers / repeaters
* Make decision to SDS or LS based on Router/Repeater role
* Don't sleep LoRA on router / repeater deep sleep
* Guards
* Platform guards
* Rename method
Such that direct message to MQTT node gets published and we get rid of always rebroadcasting when MQTT is enabled
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Fix Heltec Tracker Screen issues
Fix Heltec Tracker Screen issues like wrong offsets, display size and screen not shutting down.
Divides board into two different envs for 1.0 and 1.1 version PCB
* Helteck wireless tracker default version V1_1
* rename heltec tracker 1.1 - trunk fmt
rename varian of heltec tracker 1.1 to "heltec tracker" to be retro-compatible.
Trunk formatting.
* Heltec Tracker increase Screen update to 3Hz
Heltec Tracker increase Screen update to 3Hz from 1Hz
* Add battery level with lookup table
now uses a lookup table to better calculate battery level of different cells
* LifePo4 and PB battery table - added voltage filter
removed delay from adc reading, added a software filter to smooth out voltage readings. In those applications battery would last hours to days, no sudden change should be expected so a less frequent voltage reading or a more aggressive filtering could be done.
Note: to speed up convergence i initiliazied the last value to the minimum voltage, there are other and better ways to init the filter.
Added LiFePO4 and PB open circuit volta battery tables,
* Fixed ADC_CTRL , Checks for valid ADC readings
line 230/386 For heltec v3 and heltec tracker a different approach was used with the ADC_CTRL pin, now is more uniform using the same code for the 3 boards.
line 236 Check if the raw reading we are getting is Valid or not, count only the valid readings. This could lead to a division by 0 (improbable) so that's why at line 258 there is a check for that.
* updated OCV values
updated value to not OCV but to very low current, almost the same anyway
* Added Alkaline/Nimh voltage curve
Added Alkaline/Nimh voltage curve for AA/AAA and similar cells
* updates variants for new capacity measurement
* trunk reformatting
* trunk fmt
* Add LTO chemistry
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: code8buster <20384924+code8buster@users.noreply.github.com>
* Portduino multiple logging levels
* Fixes based on GPSFan work
* Fix derped logic
* Correct size field for AID message
* Reformat to add comments, beginning of GPS rework
* Update PM2 message for Neo-6
* Correct ECO mode logic as ECO mode is only for Neo-6
* Cleanup ubx.h add a few more comments
* GPS rework, changes for M8 and stub for M10
* Add VALSET commands for u-blox M10 receivers
* Add VALSET commands for u-blox M10 receivers
tweak M8 commands
add comments for VALSET configuration commands
* Add commands to init M10 receivers,
tweak the M8 init sequence, this is a WIP as there are still some issues during init.
Add M10 version of PMREQ.
* Add wakeup source of uartrx to PMREQ_10
The M10 does not respond to commands when asleep,
may need to do this for the M8 as well
* Enable NMEA messages on USB port.
Normally, it is a good idea to disable messages on unused ports.
Native Linux needs to be able to use GNSS modules connected via
via either serial or USB.
In the future I2C connections may be required, but are not enabled for now.
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* StoreForward updates
- Send history in "text" variant
- Don't send history the client already got
- Check if PSRAM is full
- More sensible defaults
* Set `TEXT_BROADCAST` or `TEXT_DIRECT` RequestResponse tag
* feat: E-Ink "Dynamic Partial" (#3193)
Use a mixture of full refresh, partial refresh, and skipped updates, balancing urgency and display health.
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* [create-pull-request] automated change (#3209)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
* Reset `last_index` if history was cleared, e.g. by reboot
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
Co-authored-by: Garth Vander Houwen <garthvh@yahoo.com>
* Portduino multiple logging levels
* Fixes based on GPSFan work
* Fix derped logic
* Correct size field for AID message
* Reformat to add comments, beginning of GPS rework
* Update PM2 message for Neo-6
* Correct ECO mode logic as ECO mode is only for Neo-6
* Cleanup ubx.h add a few more comments
* GPS rework, changes for M8 and stub for M10
* Add VALSET commands for u-blox M10 receivers
* Add VALSET commands for u-blox M10 receivers
tweak M8 commands
add comments for VALSET configuration commands
* Add commands to init M10 receivers,
tweak the M8 init sequence, this is a WIP as there are still some issues during init.
Add M10 version of PMREQ.
* Add wakeup source of uartrx to PMREQ_10
The M10 does not respond to commands when asleep,
may need to do this for the M8 as well
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Fixed ESP32 ADC resolution bug introduced by #3184 as esp32 analog resolution is already set some line of code before to 12 bit default.
For our usage wouldn't be faster to use 10 bit? .
Use a mixture of full refresh, partial refresh, and skipped updates, balancing urgency and display health.
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* compiling w/o e-ink display
* pinout changes
* progress getting LoRa and LCD working
* fix for bootloader, gps pins
* add canary to build matrix
* merge with main
* fix build by excluding BellModem in RadioLib
* fixes for GPS
* Fix LED_BLUE and GPS RX/TX pins
* Variant changes for merge
* make GPS baud rate configurable
* fix debug config
* Canary v1.2 changes
* Fixes for GPS
* pass trunk check
* bump protobufs to master
* update build flags to use CANARYONE enum
* use canaryone throughout for consistency.
* #define 0 is still defined
* add back .vscode/extensions.json
* bump protobufs
* revert manual change to generated file
---------
Co-authored-by: Steven Osborn <steven@lolsborn.com>
E-ink panel is DEPG0213BNS800. Otherwise, identical to v1.1 (?)
Partial refresh supported, but not implemented in this commit.
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Fix getting channel name from MQTT topic
* Allow specifying channel index in JSON field "channel" for downlink
Still requires JSON message to be published to channel named "mqtt"
* Make non-breaking if someone adds another slash
* Portduino multiple logging levels
* Fixes based on GPSFan work
* Fix derped logic
* Correct size field for AID message
* Reformat to add comments, beginning of GPS rework
* Update PM2 message for Neo-6
* Correct ECO mode logic as ECO mode is only for Neo-6
* Cleanup ubx.h add a few more comments
* GPS rework, changes for M8 and stub for M10
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Fix: mark packet via MQTT as ACKed only after we sent it out via LoRa
* Don't need to check for broadcast, DMs also get implicit ACKs
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Portduino multiple logging levels
* Fixes based on GPSFan work
* Fix derped logic
* Correct size field for AID message
* Reformat to add comments, beginning of GPS rework
* Update PM2 message for Neo-6
* Correct ECO mode logic as ECO mode is only for Neo-6
* Cleanup ubx.h add a few more comments
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* feat(variants): Add support for TXCO on TLORA_V2_1_6 devices
* chore: remove long comment
* feat(variants): Add tlora-v2-1-1_6-tcxo to build matrix
* feat(variants): Use RADIOLIB_NC as DIO1 pin for tlora_v2_1_16 with TXCO
* Use generic naming scheme, add variant to build envs
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: code8buster <20384924+code8buster@users.noreply.github.com>
* Isolate esp32 adc logic gymnastics, try simplifying getBattVoltage
* Set sense resolution for pico platforms
* try silencing cppcheck when variant has no battery pin
* ADC channel for esp-idf calibration
* Missed an rp2040 device
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add debug options for RP2040
* Rename: "observed" should be plural: "observables"
* PhoneAPI: return failure on timeout
In `onNotify()`, when disconnected, PhoneAPI removed itself from the list of observers that was looped through in `notifyObservers()`. We should exit that loop in that case.
* Add Chatter 2 default_envs
* Add Chatter 2 to varients
* Add Chatter 2 specific code to esp32 platform code
* Parameterize TFT_INVERT for Chatter 2 and specify setRotation to 1
* Fix formatting to make Trunk happy
* Remove commented out #define USE_LCC68
* Fix formatting again
* Add chatter2 to the CI matrix
---------
Co-authored-by: code8buster <20384924+code8buster@users.noreply.github.com>
* fix: allow MQTT `encryption_enabled` with `json_enabled`
* fix: copy decoded MeshPacket and release memory after use
* fix: use `packetPool` allocCopy and release methods
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Mark packets received via MQTT and add option to ignore them
* Don't send packets received via MQTT back into MQTT
Generate implicit ACK for packets we as an MQTT gateway sent
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Move to Portduino's getMacAddr()
* Add ST7735/S screen support
* Push Raspbian support into native target
* Remove latent pigpio references.
* CardKB defensive programming
* Adds configurable spidev
* Fixes to build on Fedora 40
* ENUMs are not #defines. Pull latest portduino
* Add more configuration options for SPI displays
* Add config.yaml option to set DIO3_TCXO_VOLTAGE
* change tft clear() to fillScreen()
Maintains compatability with ESPI driver.
* Adds TXen and RXen pins to portduino
* Add -c --config options to specify config file
* Fail when a specified config file is unavailable
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Attempts at getting the Heltec Wireless Paper eink operational
* Bogus comment
* Fixing Support For Heltec Wireless Paper
---------
Co-authored-by: NfN Orange <orange@reveb.la>
* Portduino reboot
* separate blocks
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>