Rev 11 | Rev 13 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 11 | Rev 12 | ||
|---|---|---|---|
| Line 40... | Line 40... | ||
| 40 | /* USER CODE BEGIN PD */ |
40 | /* USER CODE BEGIN PD */ |
| 41 | /* USER CODE END PD */ |
41 | /* USER CODE END PD */ |
| 42 | 42 | ||
| 43 | /* Private macro -------------------------------------------------------------*/ |
43 | /* Private macro -------------------------------------------------------------*/ |
| 44 | /* USER CODE BEGIN PM */ |
44 | /* USER CODE BEGIN PM */ |
| 45 | #undef TEST_CODE |
- | |
| - | 45 | ||
| 46 | /* USER CODE END PM */ |
46 | /* USER CODE END PM */ |
| 47 | 47 | ||
| 48 | /* Private variables ---------------------------------------------------------*/ |
48 | /* Private variables ---------------------------------------------------------*/ |
| 49 | CAN_HandleTypeDef hcan; |
49 | CAN_HandleTypeDef hcan; |
| 50 | 50 | ||
| Line 197... | Line 197... | ||
| 197 | 197 | ||
| 198 | // used to store data |
198 | // used to store data |
| 199 | PLX_SensorInfo info; |
199 | PLX_SensorInfo info; |
| 200 | int infoCount = -1; |
200 | int infoCount = -1; |
| 201 | 201 | ||
| 202 | loadTimingInfoFromNvram(); |
202 | // dont do this loadTimingInfoFromNvram(); |
| 203 | 203 | ||
| 204 | // HAL_IWDG_Init(&hiwdg); |
204 | // HAL_IWDG_Init(&hiwdg); |
| 205 | /* USER CODE END 2 */ |
205 | /* USER CODE END 2 */ |
| 206 | 206 | ||
| 207 | /* Infinite loop */ |
207 | /* Infinite loop */ |
| Line 248... | Line 248... | ||
| 248 | uint8_t rslt2 = bmp280_get_comp_pres_32bit(&comp_pres, ucomp_data.uncomp_press, &bmp); |
248 | uint8_t rslt2 = bmp280_get_comp_pres_32bit(&comp_pres, ucomp_data.uncomp_press, &bmp); |
| 249 | 249 | ||
| 250 | uint8_t rslt3 = bmp280_get_comp_temp_32bit(&comp_temp, ucomp_data.uncomp_temp, &bmp); |
250 | uint8_t rslt3 = bmp280_get_comp_temp_32bit(&comp_temp, ucomp_data.uncomp_temp, &bmp); |
| 251 | 251 | ||
| 252 | #if defined TEST_CODE |
252 | #if defined TEST_CODE |
| 253 | comp_pres = 30000; |
253 | comp_pres = 100000; |
| 254 | comp_temp = 4000; |
254 | comp_temp = 4000; |
| 255 | #endif |
255 | #endif |
| 256 | if (rslt2 == 0 && rslt3 == 0) |
256 | if (rslt2 == 0 && rslt3 == 0) |
| 257 | cc_feed_env(comp_pres, comp_temp); |
257 | cc_feed_env(comp_pres, comp_temp); |
| 258 | } |
258 | } |
| 259 | 259 | ||
| 260 | // compute RPM value, feed to display |
260 | // compute RPM value, feed to display |
| 261 | #if defined TEST_CODE |
261 | #if defined TEST_CODE |
| 262 | int rpm = 2000; |
262 | int rpm = 1000; |
| 263 | #else |
263 | #else |
| 264 | int rpm = CalculateRPM(); |
264 | int rpm = CalculateRPM(); |
| 265 | #endif |
265 | #endif |
| 266 | if (rpm > 0) |
266 | if (rpm > 0) |
| 267 | { |
267 | { |