Commit Graph

496 Commits

Author SHA1 Message Date
Andrew Yong
f8c3f43ea6
Fix xiao_ble variant build error due to undefined BATTERY_SENSE_RESOLUTION_BITS (#3732)
Define BATTERY_SENSE_RESOLUTION_BITS based on [amoroz's snippet on the Meshtastic forum](https://meshtastic.discourse.group/t/new-1w-diy-variant-xiao-nrf52840-ebyte-e22-900m30s/7904/10).

Fixes following build error:

```
src/Power.cpp: In member function 'virtual uint16_t AnalogBatteryLevel::getBattVoltage()':
src/Power.cpp:224:79: error: 'BATTERY_SENSE_RESOLUTION_BITS' was not declared in this scope
             scaled = operativeAdcMultiplier * ((1000 * AREF_VOLTAGE) / pow(2, BATTERY_SENSE_RESOLUTION_BITS)) * raw;
```

Signed-off-by: Andrew Yong <me@ndoo.sg>
2024-04-27 06:17:17 -05:00
Gareth Coleman
ac16ccf40c
fix for unPhone hangs during boot without sd card present (#3709)
* work around sd card hang if not present

* comment out the define for HAS_SDCARD
2024-04-24 06:41:05 -05:00
SCWhite
9c9d126f6b
[BOARD] Add new variant: TWC_Mesh (#3705)
* add new variant: TWC_mesh_v4

* fix trunk format

* fix format under wsl

* change board to TWC_mesh_v4

* change platformio & variant.h properly

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-04-23 14:09:28 -05:00
Gareth Coleman
ccbf635eef corrected a bit of overzealous tidying 2024-04-22 17:21:41 +01:00
Gareth Coleman
6669b22db3 tidied up, prob broke everything 2024-04-22 16:37:05 +01:00
quimnut
fd9461505f
adjust adc for rak11310 devices (#3698) 2024-04-21 19:51:02 -05:00
S5NC
9822a85274
Add board and variant definitions for EBYTE_ESP32-S3 (#2882)
* Create ESP32-S3-WROOM-1-N4.json

* Create pins_arduino.h

* Create platformio.ini

* Create variant.h

* Update mesh.pb.h

* Update architecture.h

* Update mesh.pb.h

* Update variant.h

* Update variant.h

Add example schematic

* Update architecture.h

* Revert update architecture.h

* Create variant.h

* Create pins_arduino.h

* Create platformio.ini

* Delete variants/E22-900M_S3 directory

* Update architecture.h

* Update variant.h

* Update platformio.ini

* Update variant.h

* Update variant.h

* Update architecture.h

* Update platformio.ini

* Update architecture.h

* Update ESP32-S3-WROOM-1-N4.json

* Update platformio.ini

* Update ESP32-S3-WROOM-1-N4.json

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update pins_arduino.h

* Update architecture.h

* add SX1268 allow

* GPS

* Commit

* Whitespace

* Update variant.h

* Update variant.h

* trunk

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: S5NC <>
2024-04-21 08:40:23 -05:00
todd-herbert
747c713ba9
(ESP32) Fix bluetooth after light-sleep; de-init for deep sleep (#3655) 2024-04-18 07:27:18 -05:00
S5NC
e813703bf5
Add support for CDEBYTE_EoRa-S3 (#3613)
* Create CDEBYTE_EoRa-S3.json

* Update CDEBYTE_EoRa-S3.json

* Update architecture.h

* Create variant.h

* Create platformio.ini

* Create pins_arduino.h

* Update variant.h

* Update variant.h

* Update variant.h

* Trunk format

* update variant.h

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: S5NC <>
2024-04-16 09:00:16 -05:00
Gareth Coleman
3413b9da41
Fixed XPT2046 syntax and using unPhone library to clean up support (#3631)
* Fixed XPT2046 syntax and using unPhone library to clean up main and TFTDisplay.

* strange extra edits removed wtf
2024-04-16 07:29:08 -05:00
Gareth Coleman
1291da746b
Support for alt I2C address for LSM6DS3 sensor, identification of TCA9555 IO Expander, resolve serial hang issue (#3622)
* 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>
2024-04-15 07:30:45 -05:00
todd-herbert
1d97544041
Wireless Paper: Fix BLE after Lightsleep (#3629)
* NimBLE deinit for deep-sleep only

* Optionally disable blink during light-sleep

* Advised to revert "blink disable"
This reverts commit 66347ce19b.
2024-04-15 06:50:42 -05:00
Manuel
5047468d9f
fix/enhancement: TFT device powersave (part 3) (#3600)
* fix: device TFT powersave (part 3)

* trunk fmt

* trunk fmt

* undo bluetooth deinit from #3596

* revert code for heltec tracker

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-04-14 09:11:27 -05:00
Gareth Coleman
f4a2023dba
LSM6DS3TR-C support (#3593)
* 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>
2024-04-11 19:40:14 -05:00
fuutott
f6e6f975c0
Update platformio.ini
should be dash instead of underscore
2024-04-05 14:58:00 +01:00
Gareth Coleman
4cdfae71cf first attempt at getting trunk to do linting 2024-04-04 11:00:10 +02:00
Gareth Coleman
be889015f7 New device unPhone using HX8357D LCD and XPT2046 touchscreen 2024-04-04 11:00:10 +02:00
AeroXuk
2caed6d29c
Feature parity between Pico and Pico W (#3538) 2024-04-02 15:36:15 -05:00
Jonathan Bennett
8bb562c5fa
Add spiTransfer function to Native to support Linux-managed CS (#3524)
* Add spiTransfer function to Native to support Linux-managed CS

* Trunk

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-04-01 18:31:36 -05:00
todd-herbert
8187fa7115
E-Ink Screensaver (#3477)
* 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>
2024-03-28 18:31:11 -05:00
code8buster
5f529f7ca3
Remove unused defines from nrf52 variants (#3482)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-24 13:41:28 -05:00
Jonathan Bennett
35754d661d
Make MAX_NUM_NODES configurable in variant.h (#3453)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-21 18:26:37 -05:00
Manuel
711b85cfe8
fix WLAN crash (#3435)
* fix WLAN crash

* link to commit in arduinothread

* revert usb mode
2024-03-18 15:42:44 -05:00
Thomas Göttgens
13cc1b0252
(3/3) Add variant for pico with waveshare and GPS hat (#3412)
* (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>
2024-03-16 10:01:43 -05:00
Andre K
0dda20bc35
fix for I2C scan getting stuck (#3375)
* refactor: add delay for T-Echo peripherals setup

* comment out `PIN_POWER_EN1`
2024-03-15 17:12:30 -05:00
Ben Meadors
2efe436102
Update nrf52 platform and consolidate Adafruit Bus IO (#3393) 2024-03-13 07:20:51 -05:00
Todd Herbert
1d31be939f Swap Wireless Paper V1.0 dependency to meshtastic/GxEPD2 2024-03-12 03:06:01 +13:00
Thomas Göttgens
4b4bd07d5c
Merge branch 'master' into eink-special-frames 2024-03-11 14:10:19 +01:00
todd-herbert
cf4753f7fd
Async full-refresh for EInkDynamicDisplay (#3339)
* Move Wireless Paper V1.1 custom hibernate behavior to GxEPD2

* Async full-refresh for EInkDynamicDisplay

* initial config for T-Echo

* formatting
responds to https://github.com/meshtastic/firmware/pull/3339#discussion_r1518175434

* increase fast-refresh limit for T-Echo
https://github.com/meshtastic/firmware/pull/3339#issuecomment-1986245727

* change dependency from private repo to meshtastic/GxEPD2

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-11 07:56:55 -05:00
Todd Herbert
c0a3b20aa3 while drafting, build from todd-herbert/meshtastic-GxEPD2#async 2024-03-10 13:45:35 +13:00
Todd Herbert
d5c11d1892 change dependency from private repo to meshtastic/GxEPD2 2024-03-10 02:11:49 +13:00
Ben Meadors
42286edc81
Merge branch 'master' into eink-async 2024-03-09 06:59:56 -06:00
Mark Trevor Birss
29335a18f5
Update variant.h (#3354) 2024-03-09 06:55:02 -06:00
Andre K
51df4fc775
fix: turn off T-Echo peripherals on deep sleep (#3162)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-08 20:15:37 -06:00
Todd Herbert
23926210d1 increase fast-refresh limit for T-Echo
https://github.com/meshtastic/firmware/pull/3339#issuecomment-1986245727
2024-03-09 09:57:30 +13:00
Todd Herbert
7275c21f6b formatting
responds to https://github.com/meshtastic/firmware/pull/3339#discussion_r1518175434
2024-03-09 09:34:53 +13:00
Todd Herbert
ac89bb3387 initial config for T-Echo 2024-03-09 09:30:34 +13:00
Todd Herbert
07da130586 Async full-refresh for EInkDynamicDisplay 2024-03-09 09:30:34 +13:00
Todd Herbert
5d4d91f775 Move Wireless Paper V1.1 custom hibernate behavior to GxEPD2 2024-03-09 09:30:34 +13:00
Steven Osborn
c860493e68
Add delay so GPS and Radio have time to power up (#3334)
* Add delay so GPS and Radio have time to power up

* reduce the delay a bit

* make delay more generic / configurable

* remove whitespace changes
2024-03-07 07:11:25 -06:00
Jonathan Bennett
e174328de3
Native Webserver (#3343)
* 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>
2024-03-06 16:23:04 -06:00
Ben Meadors
e3063a2785 Turns out bluefruit uses some of these macros even though "we" don't :-/ 2024-03-03 09:46:36 -06:00
Ben Meadors
6dbb6583ef Put these back 2024-03-03 09:33:18 -06:00
Ben Meadors
9b3e519487
Revert "Fix LED pinout for T-Echo board marked v1.0" (#3304)
* Revert "Fix LED pinout for T-Echo board marked v1.0, date 2021-6-28 (#3051)"

This reverts commit c2afa879b8.

* Remove / comment out unused LED pins
2024-03-03 08:55:52 -06:00
todd-herbert
5865add857
E-Ink: fast refresh for Wireless Paper V1.1 (#3320) 2024-03-03 07:13:56 -06:00
todd-herbert
c659292836
Reimplement "Dynamic E-Ink" as a derived class (#3316)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-02 20:07:29 -06:00
Ben Meadors
905718e2ac
Remove problematic IO2 3V3 toggling (again) as GPS EN pin (#3317)
* Remove problematic IO2 3V3 toggling (again) as GPS EN pin

* Comment

* Trunk
2024-03-02 15:45:59 -06:00
todd-herbert
6acc63729b
Refactor EInkDisplay (#3299)
* 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>
2024-02-28 09:45:15 -06:00
Ben Meadors
ce0e5c0ce7 SDA and SCL remap 2024-02-26 19:49:43 -06:00
Ben Meadors
59bbd1ad00 Revert I2C changes 2024-02-26 19:32:58 -06:00