@@ -91,10 +91,10 @@ namespace VCFInterfaceConstants {
9191 constexpr float FR_LOADCELL_SCALE = 1.0 ; // Values
9292 constexpr float FR_LOADCELL_OFFSET = 0.0 ;
9393
94- constexpr float FR_SUS_POT_SCALE = 1.0 ;
95- constexpr float FR_SUS_POT_OFFSET = 0 ;
96- constexpr float FL_SUS_POT_SCALE = 1.0 ;
97- constexpr float FL_SUS_POT_OFFSET = 0 ;
94+ constexpr float FR_SUS_POT_SCALE = 0.01396 ; // Calibrated for mm between mounting bolts
95+ constexpr float FR_SUS_POT_OFFSET = 150. 0 ;
96+ constexpr float FL_SUS_POT_SCALE = 0.01396 ; // Same as FR
97+ constexpr float FL_SUS_POT_OFFSET = 150. 0 ;
9898
9999 constexpr float BRAKE_PRESSURE_FRONT_SCALE = 1.0 ;
100100 constexpr float BRAKE_PRESSURE_FRONT_OFFSET = 0 ;
@@ -136,7 +136,7 @@ namespace VCFSystemConstants {
136136 constexpr float BRAKE_MECHANICAL_ACTIVATION_PERCENTAGE = 0 .5f ;
137137
138138 // Steering System Constants
139- constexpr uint32_t MIN_STEERING_SIGNAL_ANALOG_ADDR = 56 ; // Raw ADC value from analog sensor at minimum (left) steering angle (calibration) TODO: test and find real values for min&max
139+ constexpr uint32_t MIN_STEERING_SIGNAL_ANALOG_ADDR = 56 ; // Raw ADC value from analog sensor at minimum (left) steering angle (calibration)
140140 constexpr uint32_t MAX_STEERING_SIGNAL_ANALOG_ADDR = 60 ; // Raw ADC value from analog sensor at maximum (right) steering angle
141141 constexpr uint32_t MIN_STEERING_SIGNAL_DIGITAL_ADDR = 32 ; // Raw ADC value from digital sensor at minimum (left) steering angle
142142 constexpr uint32_t MAX_STEERING_SIGNAL_DIGITAL_ADDR = 36 ; // Raw ADC value from digital sensor at maximum (right) steering angle
@@ -171,43 +171,45 @@ namespace VCFTaskConstants {
171171 constexpr unsigned long CAN_SEND_PRIORITY = 10 ;
172172 constexpr unsigned long CAN_SEND_PERIOD = 2000 ; // 2 000 us = 500 Hz
173173
174- constexpr unsigned long PEDALS_PRIORITY = 5 ;
175- constexpr unsigned long PEDALS_SEND_PERIOD = 4000 ; // 4 000 us = 250 Hz
176- constexpr unsigned long PEDALS_SAMPLE_PERIOD = 500 ; // 500 us = 2 kHz
177-
174+
178175 constexpr unsigned long BUZZER_PRIORITY = 20 ;
179176 constexpr unsigned long BUZZER_WRITE_PERIOD = 100000 ; // 100 000 us = 10 Hz
180-
177+
181178 constexpr unsigned long DASH_SAMPLE_PRIORITY = 21 ;
182179 constexpr unsigned long DASH_SAMPLE_PERIOD = 100000 ; // 100 000 us = 10 Hz
183-
180+
184181 constexpr unsigned long DASH_SEND_PRIORITY = 7 ;
185182 constexpr unsigned long DASH_SEND_PERIOD = 100000 ; // 100 000 us = 10 Hz
186-
183+
187184 constexpr unsigned long DEBUG_PRIORITY = 100 ;
188185 constexpr unsigned long DEBUG_PERIOD = 10000 ; // 10 000 us = 2 Hz
189-
186+
190187 constexpr unsigned long NEOPIXEL_UPDATE_PRIORITY = 90 ;
191188 constexpr unsigned long NEOPIXEL_UPDATE_PERIOD = 100000 ; // 100 000 us = 10 Hz
192-
193- constexpr unsigned long STEERING_SEND_PRIORITY = 25 ;
194- constexpr unsigned long STEERING_SEND_PERIOD = 4000 ; // 4 000 us = 250 Hz
195-
196- constexpr unsigned long STEERING_SAMPLE_PERIOD = 1000 ; // 2000 us = 500 Hz
197- constexpr unsigned long STEERING_SAMPLE_PRIORITY = 10 ;
198-
189+
190+
199191 constexpr unsigned long LOADCELL_SAMPLE_PRIORITY = 24 ;
200192 constexpr unsigned long LOADCELL_SAMPLE_PERIOD = 250 ; // 250 us = 4 kHz
201193 constexpr unsigned long LOADCELL_SEND_PRIORITY = 25 ;
202194 constexpr unsigned long LOADCELL_SEND_PERIOD = 4000 ; // 4 000 us = 250 Hz
203-
195+
204196 constexpr unsigned long ETHERNET_SEND_PRIORITY = 20 ;
205197 constexpr unsigned long ETHERNET_SEND_PERIOD = 100000 ; // 100 000 us = 10Hz
206-
198+
199+ constexpr unsigned long PEDALS_PRIORITY = 5 ;
200+ constexpr unsigned long PEDALS_SEND_PERIOD = 4000 ; // 4 000 us = 250 Hz
201+ constexpr unsigned long PEDALS_SAMPLE_PERIOD = 500 ; // 500 us = 2 kHz
202+
207203 constexpr unsigned long PEDALS_RECALIBRATION_PRIORITY = 150 ;
208204 constexpr unsigned long PEDALS_RECALIBRATION_PERIOD = 100000 ; // 100 000 us = 10 Hz
205+
206+ constexpr unsigned long STEERING_SEND_PRIORITY = 25 ;
207+ constexpr unsigned long STEERING_SEND_PERIOD = 4000 ; // 4 000 us = 250 Hz
208+
209+ constexpr unsigned long STEERING_SAMPLE_PERIOD = 1000 ; // 2000 us = 500 Hz
210+ constexpr unsigned long STEERING_SAMPLE_PRIORITY = 10 ;
209211
210- constexpr unsigned long STEERING_RECALIBRATION_PRIORITY = 150 ; // TODO: Determine real values for these
212+ constexpr unsigned long STEERING_RECALIBRATION_PRIORITY = 150 ;
211213 constexpr unsigned long STEERING_RECALIBRATION_PERIOD = 100000 ;
212214
213215 // IIR filter alphas
0 commit comments