Skip to content

Commit

Permalink
Removed road speed
Browse files Browse the repository at this point in the history
  • Loading branch information
jsphuebner committed Aug 27, 2024
1 parent 486a7b8 commit a70b9b9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions include/param_prj.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
PARAM_ENTRY(CAT_MOTOR, dirchrpm, "rpm", 0, 20000, 100, 87 ) \
PARAM_ENTRY(CAT_MOTOR, dirmode, DIRMODES, 0, 4, 1, 95 ) \
PARAM_ENTRY(CAT_MOTOR, snsm, SNS_M, 12, 23, 12, 46 ) \
PARAM_ENTRY(CAT_MOTOR, roadspeedgain,"1000r/mile", 0, 20, 8.2, 111 ) \

#define MOTOR_PARAMETERS_SINE \
PARAM_ENTRY(CAT_MOTOR, boost, "dig", 0, 37813, 1700, 1 ) \
Expand Down Expand Up @@ -175,7 +174,6 @@
#define VALUE_BLOCK2 \
VALUE_ENTRY(fstat, "Hz", 2011 ) \
VALUE_ENTRY(speed, "rpm", 2012 ) \
VALUE_ENTRY(roadspeed, "kmh/mph",2043 ) \
VALUE_ENTRY(cruisespeed, "rpm", 2041 ) \
VALUE_ENTRY(turns, "", 2037 ) \
VALUE_ENTRY(amp, "dig", 2013 ) \
Expand Down
3 changes: 0 additions & 3 deletions src/stm32_sine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,13 @@ static void Ms10Task(void)
int newMode = MOD_OFF;
int stt = STAT_NONE;
float udc = VehicleControl::ProcessUdc();
uint32_t speed = Encoder::GetSpeed();

ErrorMessage::SetTime(rtc_get_counter_val());
Encoder::UpdateRotorFrequency(100);
VehicleControl::CalcAndOutputTemp();
VehicleControl::GetDigInputs();
float torquePercent = VehicleControl::ProcessThrottle();
float roadSpeed = (speed * Param::GetFloat(Param::roadspeedgain)) / 1000.0f;

Param::SetFloat(Param::roadspeed, roadSpeed);
Param::SetInt(Param::speed, Encoder::GetSpeed());
Param::SetInt(Param::rotordir, Encoder::GetRotorDirection());

Expand Down

0 comments on commit a70b9b9

Please sign in to comment.