File tree Expand file tree Collapse file tree 6 files changed +20
-26
lines changed
Expand file tree Collapse file tree 6 files changed +20
-26
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,7 @@ using namespace sensesp;
2222reactesp::ReactESP app;
2323
2424void setup () {
25- // Some initialization boilerplate when in debug mode...
26- #ifndef SERIAL_DEBUG_DISABLED
27- SetupSerialDebug (115200 );
28- #endif
25+ SetupLogging ();
2926
3027 SensESPAppBuilder builder;
3128
@@ -99,8 +96,6 @@ void setup() {
9996 vedi->parser .data .maximum_auxiliary_voltage .connect_to (
10097 new SKOutputFloat (" electrical.batteries.start.maximumVoltage" ,
10198 " /Signal K/Start Battery Maximum Voltage" ));
102-
103- sensesp_app->start ();
10499}
105100
106101void loop () { app.tick (); }
Original file line number Diff line number Diff line change @@ -24,10 +24,7 @@ using namespace sensesp;
2424reactesp::ReactESP app;
2525
2626void setup () {
27- // Some initialization boilerplate when in debug mode...
28- #ifndef SERIAL_DEBUG_DISABLED
29- SetupSerialDebug (115200 );
30- #endif
27+ SetupLogging ();
3128
3229 SensESPAppBuilder builder;
3330
@@ -68,8 +65,6 @@ void setup() {
6865 " electrical.solar." SOLAR_CHARGE_CONTROLLER_ID " .maxPowerToday" ,
6966 " /Signal K/Solar Charger " SOLAR_CHARGE_CONTROLLER_ID
7067 " Max Power Today" ));
71-
72- sensesp_app->start ();
7368}
7469
7570void loop () { app.tick (); }
Original file line number Diff line number Diff line change 1818 {
1919 "name" : " SensESP" ,
2020 "owner" : " SignalK" ,
21- "version" : " ^2.5 .1"
21+ "version" : " >=3.0.0-beta.1,<4.0.0-alpha .1"
2222 }
2323 ],
24- "version" : " 1 .0.0" ,
24+ "version" : " 3 .0.0" ,
2525 "frameworks" : " arduino" ,
2626 "platforms" : " *"
27- }
27+ }
Original file line number Diff line number Diff line change 99; https://docs.platformio.org/page/projectconf.html
1010
1111[platformio]
12- default_envs =
12+ default_envs =
1313 esp32dev
1414
1515[env]
1616framework = arduino
1717lib_ldf_mode = deep
1818monitor_speed = 115200
19- lib_deps =
20- SignalK/SensESP @ ^2.5.1
21-
19+ lib_deps =
20+ SignalK/SensESP@>=3.0.0-beta.1,<4.0.0
21+
2222[espressif32_base]
2323platform = espressif32
2424build_unflags = -Werror =reorder
@@ -28,5 +28,12 @@ monitor_filters = esp32_exception_decoder
2828[env:esp32dev]
2929extends = espressif32_base
3030board = esp32dev
31- build_flags =
32- -D LED_BUILTIN =2
31+ build_flags =
32+ -D LED_BUILTIN =2
33+ ; Max (and default) debugging level in Arduino ESP32 Core
34+ -D CORE_DEBUG_LEVEL =ARDUHAL_LOG_LEVEL_VERBOSE
35+ ; Arduino Core bug workaround: define the log tag for the Arduino
36+ ; logging macros.
37+ -D TAG =' "Arduino"'
38+ ; Use the ESP-IDF logging library - required by SensESP.
39+ -D USE_ESP_IDF_LOG
Original file line number Diff line number Diff line change 44#include " sensesp.h"
55
66VEDirectInput::VEDirectInput (Stream* rx_stream)
7- : Sensor(), rx_stream_{rx_stream} {}
8-
9- void VEDirectInput::start () {
7+ : rx_stream_{rx_stream} {
108 // enable reading the serial port
119 ReactESP::app->onAvailable (*rx_stream_, [this ]() {
1210 while (rx_stream_->available ()) {
Original file line number Diff line number Diff line change @@ -8,10 +8,9 @@ using namespace sensesp;
88
99namespace sensesp {
1010
11- class VEDirectInput : public Sensor {
11+ class VEDirectInput {
1212 public:
1313 VEDirectInput (Stream* rx_stream);
14- virtual void start () override final ;
1514 VEDirect::Parser parser;
1615
1716 private:
You can’t perform that action at this time.
0 commit comments