Commit Graph

7860 Commits

Author SHA1 Message Date
Tavis
fa6624548b
Serial Mode for Ecowitt WS85 weather station. (#4296)
* 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>
2024-07-21 07:09:37 -05:00
Ben Meadors
dadf9234e5
Remove status topic (#4305) 2024-07-21 07:09:10 -05:00
Mictronics
f9d79964ef
Remove duplicate code and fix error: #if with no expression (#4307)
* 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>
2024-07-20 06:47:04 -05:00
todd-herbert
54df153e9e
Wait for I2C power to stabilize on Heltec VME213; tidy variant folder (#4308)
* 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
2024-07-20 06:46:26 -05:00
github-actions[bot]
f25644e8cf
[create-pull-request] automated change (#4287)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-07-18 06:13:03 -05:00
Ben Meadors
46d7b82ac1
Migrate to new defaults (#4294)
* 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!
2024-07-16 09:37:50 -05:00
Tom Fifield
9db3552e5a
Remove softdevice folder from wio-sdk-wm1110 (#4295)
Recently, softdevice was moved to platform/nrf52. We missed
deleting this one.
2024-07-16 06:31:25 -05:00
Tom Fifield
0f5fdfbab7
Make mergehex executable. (#4290)
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.
2024-07-15 07:11:37 -05:00
Ben Meadors
a04de8c6b3 Add PaxCounter to the mix 2024-07-14 06:27:16 -05:00
todd-herbert
3fa8b357e5
Initial work for Heltec Vision Master 213 (#4286)
* 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>
2024-07-13 17:36:07 -05:00
GUVWAF
9e4ce86c2a
Let StoreForward server send history to phoneAPI (#4282)
* 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>
2024-07-13 12:36:44 -05:00
Tom Fifield
141ae296b7
Add Seeed Wio WM1110 to Github issue template (#4283) 2024-07-13 06:47:38 -05:00
Lennart Buhl
ca2b45a6e2
Fix that Dockerfile would not run with podman (#4262)
* Fix that Dockerfile would not run with podman

* Migrate away from non-OCI-compliant SHELL command in Dockerfile
2024-07-13 06:09:51 -05:00
Ben Meadors
4286f2c2dd
Minor version bump 2024-07-13 06:07:20 -05:00
Ben Meadors
c5d747cd3e
Scale default intervals based for *online* mesh size past 40 nodes (#4277)
* 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
2024-07-13 05:59:19 -05:00
Ben Meadors
0fa9974518
Don't send node info interrogation when ch. util is >25% (#4273) 2024-07-12 11:48:35 -05:00
Ben Meadors
699d37b04c
Move up telemetry defaults to every 30 minutes (#4274) 2024-07-12 09:24:42 -05:00
todd-herbert
eabec5ae34
Show specific frame when updating screen (#4264)
* 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>
2024-07-11 18:51:26 -05:00
Ben Meadors
df194ca0f0
WM1110 SDK kit enter serial DFU and add deployment packages (#4266)
* 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
2024-07-11 14:08:31 -05:00
Warren Guy
974fc31856
INA3221 sensor: use for bus voltage & environment metrics (#4215)
* 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>
2024-07-11 08:34:55 -05:00
Daniel.Cao
e79a7dce07
Optimize the shutdown current of RAK10701 to around 25uA (#4260)
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2024-07-11 08:34:33 -05:00
todd-herbert
33831cd41c
GPS Power State tidy-up (#4161)
* 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.
2024-07-11 15:26:43 +12:00
github-actions[bot]
11bca437fd
[create-pull-request] automated change (#4263)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-07-10 15:15:57 -05:00
Jonathan Bennett
e59e50af0e
Update build_raspbian_armv7l.yml --fix-missing 2024-07-10 14:42:29 -05:00
Jonathan Bennett
51d54a7d99
Update trunk.yaml 2024-07-10 14:39:41 -05:00
Jonathan Bennett
17c2d60b78
Update trunk.yaml, fix whitespace 2024-07-10 12:47:34 -05:00
Ben Meadors
c887675bb4 Fix missing 2024-07-10 09:35:18 -05:00
Ben Meadors
5c71187db1 Tell trunk to ignore bin folder 2024-07-10 07:34:41 -05:00
Ben Meadors
8048fab084 Move e290 to board level extra while CI is broken 2024-07-10 07:28:29 -05:00
Ben Meadors
e74d77dc44 Fix macros 2024-07-09 15:11:11 -05:00
Ben Meadors
ba8d17b9c1 Trunk fmt 2024-07-09 12:16:56 -05:00
github-actions[bot]
9ad0addbbf
[create-pull-request] automated change (#4259)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-07-09 12:07:23 -05:00
Aaron.Lee
1626667400
Add Heltec new boards. (#4226)
* Add Heltec new boards

* Update variant.h

disable RTC by default

* Add Heltec New boards

* Add Heltec new boards

* Update Heltec Mesh Node definition.

* Update Heltec Vision Mater E290
2024-07-09 11:56:57 -05:00
Ben Meadors
a3777e8f29 Helps if you remove the original clause 2024-07-09 09:23:59 -05:00
Ben Meadors
8b388d1e27 Skip dfu file for sdk (for now) 2024-07-09 09:12:23 -05:00
Ben Meadors
9f089746da Collect hex files and specifically wm1110 sdk 2024-07-09 08:31:16 -05:00
geeksville
33c46d6eb1
fix python warning in uf2conf (#4235)
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
2024-07-09 07:19:03 -05:00
Tom Fifield
308060b1fe
Add wio-sdk-wm1110 to build. (#4258)
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.
2024-07-08 20:59:27 -05:00
github-actions[bot]
a664d4597f
[create-pull-request] automated change (#4247)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-07-08 14:26:19 -05:00
Ben Meadors
2b9848bf1b
Remove tracker variant specific soft device headers (#4255) 2024-07-08 08:16:38 -05:00
Tom Fifield
deb7c274c4
Cleanup NRF s140 Softdevice variants (#4252)
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.
2024-07-08 06:02:05 -05:00
Mark Trevor Birss
e1bf4c32f3
Update to SoftDevice 7.3.0 for wio-sdk-wm1110 and wio-tracker-wm1110 (#4248)
* Update variant.h

* Update wio-tracker-wm1110.json

* Update wio-sdk-wm1110.json

* Update platformio.ini

* Update platformio.ini

* Add files via upload

* Add files via upload

* Update variant.h
2024-07-07 12:14:18 -05:00
GUVWAF
86ca81b555
If toPhoneQueue is full, still increment fromNum to avoid client never getting packets (#4246) 2024-07-07 09:06:42 -05:00
geeksville
f59d98482f
Fix build when HAS_NETWORKING is false on nrf52 (#4237)
(tested on a rak4631 by setting HAS_ETHERNET false when shrinking
image)
2024-07-07 07:08:49 -05:00
geeksville
27dfe10689
Fix BLE logging on nrf52 (#4244)
* 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>
2024-07-07 06:50:47 -05:00
Agent Blu, 006
7b838d388d
Updated raspbian CI to update apt repository ahead of libbluetooth. (#4243) 2024-07-06 19:45:58 -05:00
todd-herbert
c3d3dfa8c8
Tidy Wireless Paper variant files (#4238)
* 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`
2024-07-06 12:41:29 -05:00
Tom Fifield
8be378c227
fix typo in build-nrf52.sh (#4231)
chmod is the command, '+x' is the argument.
2024-07-05 09:03:45 -05:00
Manuel
ae420dcd21
Fix exclude macros (#4233)
* fix MESHTASTIC_EXCLUDE_BLUETOOTH

* fix HAS_SCREEN=0

* fix MESHTASTIC_EXCLUDE_GPS
2024-07-05 08:58:16 -05:00
Ben Meadors
c1df621711 Sudo 2024-07-04 08:32:59 -05:00