* protobufs
* initial mods, not tested
* manual telem packet creation, compiles.
* add gust and lull computation
* telem packet is getting fired off
* new pb ?
* pb and gust lull
* need to set the variant type for it to work.
* add gust and lull to mqtt json output.
* parse bat voltage and cap voltage and send the larger of the two in telem packet
also use the new ws85 serial mode (6). must set it with cli. : meshtastic --set serial.mode 6
* set hard coded average/transmit interval to 5 minutes.
* proper direction averging with trig.
* Update protobufs
* sweep some crud
* read in 512 bytes at a time and break and clear serial input if we got wind data
* factor out sendTelemetry function
* Revert "factor out sendTelemetry function"
This reverts commit b61ba1a3c5.
* Reapply "factor out sendTelemetry function"
This reverts commit d0af9cfd7d.
* update protobufs
* put WS85 Serial2 is tcho and canaryone exclusion #ifdef
* include GeoCoord.h so dr-dev will compile.
* remove old TODO comment.
* breakout WS85 serial operation to it's own function called processWXSerial()
* canaryone and t-echo exclusion for Serial2
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Fix LED pinout for T-Echo board marked v1.0, date 2021-6-28
* Merge PR #420
* Fixed double and missing Default class.
* Use correct format specifier and fixed typo.
* Removed duplicate code.
* Fix error: #if with no expression
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Tidy variant.h and pins_arduino.h (VME213)
* Wait for peripherals to stabilize after enabling I2C power
The 3.3V power for the I2C "quick link" connector is from Ve_3V3
* Upgrade module config state version but don't blow everything away
* ModuleConfig version intervals roll forward
* Be specific about version migration criteria
* initModuleConfigIntervals fix
* Don't forget power!
Previously, we used sudo and chmod to make mergehex executable in
our build script. This change attempts to set the executable bit
using git properties and remove the dependence on elevated
permissions.
* Fix for serial monitoring and I2C for Vision Master e213 (#4280)
* Fix for serial monitoring and I2C
The board did not allow serial monitoring while on boot mode, i was able to fix this by adding a board variant. I also corrected the i2c pins. I was able to test it with a cardkb
* oops
I delete some code by mistake, all back now
* Made some adjustments
* Minimize the diff
---------
Co-authored-by: Todd Herbert <herbert.todd@gmail.com>
* Don't redefine board identifier
Suppresses compiler warnings
* Detect Vision Master 213 with PIO serial monitor
* Use outermost button as user-button
Less chance of accidentally hitting reset
* Use 1200bps touch (213)
Allows upload without manually entering bootloader
---------
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
* Send StoreForward history of the server to a connected client
To extend the ToPhoneQueue
* Add delay after sending history info
* Don't allow history request over LoRa on default channel
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add congestion scaling coefficient
* Added active mesh sized based interval scaling
* Moved back to bottom
* Format
* Add observers and use correct number of online nodes
* Updated setFrames in Screen.cpp
Added code to attempt to revert back to the same frame that user was on prior to setFrame reload.
* Space added Screen.cpp
* Update Screen.cpp
Make screen to revert to Frame 0 if the originally displayed frame is no longer there.
* Update Screen.cpp
Inserted boolean holdPosition into setFrames to indicate the requirement to stay on the same frame ( if =true) or else it will switch to new frame .
Only Screen::handleStatusUpdate calls with setFrame(true). ( For Node Updates)
All other types of updates call as before setFrame(), so it will change focus as needed.
* Hold position, even if number of frames increases
* Hold position, if handling an outgoing text message
* Update Screen.cpp
* Reverted chnages related to devicestate.has_rx_text_message
* Reset to master
* CannedMessages only handles routing packets when waiting for ACK
Previously, this was calling Screen::setFrames at unexpected times
* Gather position info about screen frames while regenerating
* Make admin module observable
Notify only when relevant. Currently: only to handle remove_nodenum.
* Optionally specify which frame to focus when setFrames runs
* UIFrameEvent uses enum instead of multiple booleans
* Allow modules to request their own frame to be focussed
This is done internally by calling MeshModule::requestFocus()
Easier this way, insteady of passing the info in the UIFrameEvent:
* Modules don't always know whether they should be focussed until after the UIFrameEvent has been raised, in dramFrame
* Don't have to pass reference to module instance as parameter though several methods
* E-Ink screensaver uses FOCUS_PRESERVE
Previously, it had its own basic implementation of this.
* Spelling: regional variant
* trunk
* Fix HAS_SCREEN guarding
* More HAS_SCREEN guarding
---------
Co-authored-by: BIST <77391720+slash-bit@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: slash-bit <v-b2@live.com>
* Switch default upload protocol to nrfutil so that pio generates zip deploy packages
* Enter serial DFU on SDK board
* Remove guard for DFU zip from SDK build
* NRF_USE_SERIAL_DFU macro instead
* use INA3221 for bus voltage; fixes for telemetry variants
- add to sensors available for environment telemetry
(to report voltage/current)
- add vars to define channels to use for battery voltage
(for getBusVoltage) and environment metrics (default
to CH1 for both)
- write to the correct fields on the measurement struct
depending on the measurement variant, and DRY up the
sensor measurement collection code a bit
- this might be suitable for a common implementation for
the INA* sensors in a future PR...
* formatting
* derp
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Refactor GPSPowerState enum
Identifies a case where the GPS hardware is awake, but an update is not yet desired
* Change terminology
* Clear old lock-time prediction on triple press
* Use exponential smoothing to predict lock time
* Rename averageLockTime to predictedLockTime
* Attempt: Send PMREQ with duration 0 on MCU deep-sleep
* Attempt 2: Send PMREQ with duration 0 on MCU deep-sleep
* Revert "Attempt 2: Send PMREQ with duration 0 on MCU deep-sleep"
This reverts commit 8b697cd2a4.
* Revert "Attempt: Send PMREQ with duration 0 on MCU deep-sleep"
This reverts commit 9d29ec7603.
* Remove unused notifyGPSSleep Observable
Handled with notifyDeepSleep, and enable() / disable()
* WIP: simplify GPS power management
An initial attempt only.
* Honor #3e9e0fd
* No-op when moving between GPS_IDLE and GPS_ACTIVE
* Ensure U-blox GPS is awake to receive indefinite sleep command
* Longer pause when waking U-blox to send sleep command
* Actually implement soft and hard sleep..
* Dynamically estimate the threshold for GPS_HARDSLEEP
* Fallback to GPS_HARDSLEEP, if GPS_SOFTSLEEP unsupported
* Move "excessive search time" behavior to scheduler class
* Minor logging adjustments
* Promote log to warning
* Gratuitous buffer clearing on boot
* Fix inverted standby pin logic
Specifically the standby pin for L76B, L76K and clones
Discovered during T-Echo testing: totally broken function, probe method failing.
* Remove redundant pin init
Now handled by setPowerState
* Replace max() with if statements
Avoid those platform specific implementations..
* Trunk formatting
New round of settings.json changes keep catching me out, have to remember to re-enable my "clang-format" for windows workaround.
* Remove some asserts from setPowerState
Original aim was to prevent sending a 0 second PMREQ to U-blox hardware as part of a timed sleep (GPS_HARDSLEEP, GPS_SOFTSLEEP). I'm not sure this is super important, and it feels tidier to just allow the 0 second sleeptime here, rather than fudge the sleeptime further up.
* Fix an error determining whether GPS_SOFTSLEEP is supported
* Clarify a log entry
* Set PIN_STANDBY for MCU deep-sleep
Required to reach TTGO's advertised 0.25mA sleep current for T-Echo. Without this change: ~6mA.
the old regex worked but was technically incorrect. fixes:
Generating NRF52 uf2 file
/home/kevinh/development/meshtastic/firmware/bin/uf2conv.py:195: SyntaxWarning: invalid escape sequence '\s'
words = re.split('\s+', line)
Converting to uf2, output size: 1458688, start address: 0x26000
The wio-sdk-wm1110 is distinct from the wio-tracker-wm1110, with
different platformio build options and pin config.
This change adds the wio-sdk-wm1110 to the CI matrix so firmware
is built as part of release.
Note: This idea is originally from @caveman99 and should be
credited as such. Submitting as a separate PR so the work in
meshtastic/firmware#4148 can be a bit cleaner and Seeed boards
can build while that work is ongoing.
The nrf52 boards that depend on the v7 softdevice all use the same
code and linker files. Rather than duplicate the code, keep it
all together with the platform.
* allow ble logrecords to be fetched either by NOTIFY or INDICATE ble types
This allows 'lossless' log reading. If client has requested INDICATE
(rather than NOTIFY) each log record emitted via log() will have to fetched
by the client device before the meshtastic node can continue.
* Fix serious problem with nrf52 BLE logging.
When doing notifies of LogRecords it is important to use the
binary write routines - writing using the 'string' write won't work.
Because protobufs can contain \0 nuls inside of them which if being
parsed as a string will cause only a portion of the protobuf to be sent.
I noticed this because some log messages were not getting through.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Quick tidy of pins_arduino.h
Matches requests made at https://github.com/meshtastic/firmware/pull/4226#discussion_r1664183480)
* Tidy variant.h
* Change deprecated ADC attenuation parameter
From 11dB to 12dB. Resolves compiler warning. Allegly, no impact on function: `This is deprecated, it behaves the same as `ADC_ATTEN_DB_12`