fix steering implementation

This commit is contained in:
2023-09-04 19:51:19 +02:00
parent 4e492fb10b
commit 319ae576ad
7 changed files with 75 additions and 73 deletions

View File

@@ -8,8 +8,8 @@
#include "drive.h"
#include "car.h"
#include "can_message.h"
#include "steering.h"
#include "factory/factory.h"
//#include "steering.h"
//#include "factory/factory.h"
void DRIVE_init(DRIVE* me){
me->state = STDR_INIT;
@@ -33,7 +33,7 @@ bool DRIVE_processEvent(Event* ev) {
DRIVE_STATES oldState = me->state;
evIDT evid = Event_getId(ev);
uint64_t data = Event_getData(ev);
STEERING_STATES steeringState = steering()->state;
// STEERING_STATES steeringState = steering()->state;
switch (me->state) { // onState
@@ -59,9 +59,9 @@ bool DRIVE_processEvent(Event* ev) {
}
if (ev->id == evDRpollTorque) {
if(steeringState == STST_RUN) {
//if(steeringState == STST_RUN) {
CM_DRIVE_POWER(&eKart.torque);
}
//}
}
if (ev->id == evDRpollSpeed) {