diff --git a/projects/dashboard/src/StartMotors.cpp b/projects/dashboard/src/StartMotors.cpp index b40764bb2..c1719094f 100644 --- a/projects/dashboard/src/StartMotors.cpp +++ b/projects/dashboard/src/StartMotors.cpp @@ -20,7 +20,10 @@ void StartMotors::CreateGUI() { } void StartMotors::Update() { - if (display_->enter.PosEdge()) { + auto veh_msg = display_->veh_bus.GetRxBppsSteerDebug(); + + if (display_->enter.PosEdge() && + (veh_msg.has_value() && veh_msg->BppsPercent() > 0.20)) { display_->ChangeState(State::STARTING_MOTORS); } } \ No newline at end of file diff --git a/projects/dashboard/src/StartingMotors.cpp b/projects/dashboard/src/StartingMotors.cpp index db5ac0d45..5143b7d6c 100644 --- a/projects/dashboard/src/StartingMotors.cpp +++ b/projects/dashboard/src/StartingMotors.cpp @@ -1,6 +1,7 @@ #include "StartingMotors.hpp" #include "Display.hpp" +#include "lvgl.h" StartingMotors::StartingMotors(Display* display) : Screen(display) {} diff --git a/projects/veh.dbc b/projects/veh.dbc index dff7a7ea2..8e40a5211 100644 --- a/projects/veh.dbc +++ b/projects/veh.dbc @@ -191,10 +191,10 @@ BO_ 401 AppsDebug: 8 FC SG_ Apps2Percent : 48|16@1+ (0.1,0) [0|0] "percent" RPI BO_ 402 BppsSteerDebug: 8 FC - SG_ BppsRawVolt : 0|16@1+ (0.001,0) [0|0] "volt" RPI - SG_ SteerRawVolt : 16|16@1+ (0.001,0) [0|0] "volt" RPI - SG_ BppsPercent : 32|16@1+ (0.1,0) [0|0] "percent" RPI - SG_ SteerPosition : 48|16@1+ (0.01,-1) [0|0] "[-1,+1]" RPI + SG_ BppsRawVolt : 0|16@1+ (0.001,0) [0|0] "volt" RPI, DASH + SG_ SteerRawVolt : 16|16@1+ (0.001,0) [0|0] "volt" RPI, DASH + SG_ BppsPercent : 32|16@1+ (0.1,0) [0|0] "percent" RPI, DASH + SG_ SteerPosition : 48|16@1+ (0.01,-1) [0|0] "[-1,+1]" RPI, DASH BO_ 411 LvDbcHash: 8 LVC SG_ Hash : 0|64@1+ (1,0) [0|1] "" FC