feedc0de fixes

This commit is contained in:
2021-05-29 00:00:33 +02:00
parent ddb4859a3f
commit db10a294de
4 changed files with 14 additions and 14 deletions

View File

@ -96,10 +96,10 @@ platform = ${common_env_data.platform}
board = ${common_env_data.board}
framework = ${common_env_data.framework}
platform_packages = ${common_env_data.platform_packages}
board_build.partitions = partitions_4M_ota.csv
board_build.partitions = partitions_16M_ota.csv
lib_deps =
${common_env_data.lib_deps}
${webserver_common.lib_deps}
; ${webserver_common.lib_deps}
lib_compat_mode = ${common_env_data.lib_compat_mode}
build_unflags = ${common_env_data.build_unflags}
build_flags =
@ -128,7 +128,7 @@ build_flags =
${default_limits.build_flags}
-DDEVICE_PREFIX=bobbyquad
-DAP_PASSWORD=Passwort_123
${webserver_common.build_flags}
; ${webserver_common.build_flags}
; -DFEATURE_ARDUINOOTA
; -DFEATURE_WEBOTA
-DFEATURE_DPAD_5WIRESW
@ -150,8 +150,8 @@ build_flags =
-DDEFAULT_GASMAX=1300
-DDEFAULT_BREMSMIN=200
-DDEFAULT_BREMSMAX=1500
; -DFEATURE_BLUETOOTH
; -DFEATURE_BMS
-DFEATURE_BLUETOOTH
-DFEATURE_BMS
; -DFEATURE_GAMETRAK
; -DPINS_GAMETRAKX=34
; -DPINS_GAMETRAKY=39
@ -162,7 +162,7 @@ build_flags =
; -DDEFAULT_GAMETRAKYMAX=4095
; -DDEFAULT_GAMETRAKDISTMIN=0
; -DDEFAULT_GAMETRAKDISTMAX=4095
-DFEATURE_CLOUD
; -DFEATURE_CLOUD
-DFEATURE_CAN
[env:feedc0de_usb]

View File

@ -59,10 +59,8 @@ void initCan()
}
template<bool isBack>
bool parseCanMessage(const can_message_t &message)
bool parseCanMessage(const can_message_t &message, Controller &controller)
{
auto &controller = isBack ? controllers.back : controllers.front;
switch (message.identifier)
{
using namespace bobbycar::can;
@ -143,7 +141,7 @@ bool parseCanInput()
return false;
}
if (parseCanMessage<false>(message))
if (parseCanMessage<false>(message, controllers.front))
{
if (millis() - controllers.back.lastCanFeedback > 100)
controllers.back.feedbackValid = false;
@ -158,7 +156,7 @@ bool parseCanInput()
controllers.front.feedbackValid = false;
}
if (parseCanMessage<true>(message))
if (parseCanMessage<true>(message, controllers.back))
{
controllers.back.lastCanFeedback = millis();
controllers.back.feedbackValid = true;

View File

@ -18,7 +18,7 @@ class StatusDisplay;
}
namespace {
#ifdef FEATURE_ARDUINOOTA
#if defined(FEATURE_ARDUINOOTA) || defined(FEATURE_WEBOTA)
class UpdateDisplay : public Display, public DummyBack
{
public:

View File

@ -109,7 +109,7 @@ void printMemoryStats(const char *s)
void cloudTask(void*)
{
const esp_websocket_client_config_t config = {
.uri = "--REMOVED--",
.uri = "ws://iot.wattpilot.io:8080/charger/bobbycar1",
};
esp_websocket_client_handle_t handle = esp_websocket_client_init(&config);
@ -166,7 +166,7 @@ void cloudTask(void*)
else
Serial.println("Not sending cloud because not connected");
delay(1000);
delay(100);
}
}
else
@ -332,9 +332,11 @@ void setup()
printMemoryStats("initOta()");
#endif
#ifdef FEATURE_WEBSERVER
bootLabel.redraw("webserver");
initWebserver();
printMemoryStats("initWebserver()");
#endif
bootLabel.redraw("potis");
readPotis();