fix uint8 -> uint16

This commit is contained in:
v.chau 2025-07-06 18:01:12 +02:00
parent dbab6d3ba3
commit 45caa399ae
7 changed files with 22 additions and 22 deletions

View File

@ -294,7 +294,7 @@ void HTPA_ReadSensor(uint32_t dataArray[32]) {
ambient_temperature = ptat_topBlock * ptatgr + ptatoff; // value in dK
// find column of lookup table (ambient temperature)
for(uint8_t i = 0; i < NROFTAELEMENTS; i++) {
for(uint16_t i = 0; i < NROFTAELEMENTS; i++) {
if(ambient_temperature > XTATemps[i]) {
table_col = i;
}

View File

@ -10,7 +10,7 @@
#include "HTPA_32x32d.h"
// CAN Frame:
#define TTS_CANIDSTART 0x701; //1793-1796 0x701 - 0x704 FL,FR,RL,RR
#define TTS_CANIDSTART 0x702; //1793-1796 0x701 - 0x704 FL,FR,RL,RR
CAN_HandleTypeDef* tts_hcan;
CAN_TxHeaderTypeDef tts_canHeader;
uint8_t tts_canData[8];
@ -25,7 +25,7 @@ TTS_TireData tts_tiredb[4];
void TTS_Init(CAN_HandleTypeDef *hcan) {
// initialize values
TTS_LoadTireData();
tts_sensorid = TTS_FL;
tts_sensorid = TTS_FR;
tts_carid = FT25;
tts_tireid = OZ7_SLICKS;
@ -52,7 +52,7 @@ void TTS_Init(CAN_HandleTypeDef *hcan) {
// init CAN_Tx Frame
//uint8_t canID = tts_sensorid + TTS_CANIDSTART;
tts_canHeader.IDE = CAN_ID_STD;
tts_canHeader.StdId = 0x701;
tts_canHeader.StdId = 0x702;
tts_canHeader.DLC = 8;
tts_canHeader.RTR = CAN_RTR_DATA;
for(uint8_t i=0; i<8; i++) {

Binary file not shown.

View File

@ -5679,20 +5679,20 @@ void HTPA_ReadSensor(uint32_t dataArray[32]) {
8002c7e: 601a str r2, [r3, #0]
// find column of lookup table (ambient temperature)
for(uint8_t i = 0; i < NROFTAELEMENTS; i++) {
8002c80: 2339 movs r3, #57 @ 0x39
for(uint16_t i = 0; i < NROFTAELEMENTS; i++) {
8002c80: 2338 movs r3, #56 @ 0x38
8002c82: 2228 movs r2, #40 @ 0x28
8002c84: 189b adds r3, r3, r2
8002c86: 19da adds r2, r3, r7
8002c88: 2300 movs r3, #0
8002c8a: 7013 strb r3, [r2, #0]
8002c8a: 8013 strh r3, [r2, #0]
8002c8c: e024 b.n 8002cd8 <HTPA_ReadSensor+0x204>
if(ambient_temperature > XTATemps[i]) {
8002c8e: 2439 movs r4, #57 @ 0x39
8002c8e: 2438 movs r4, #56 @ 0x38
8002c90: 2128 movs r1, #40 @ 0x28
8002c92: 1863 adds r3, r4, r1
8002c94: 19db adds r3, r3, r7
8002c96: 781b ldrb r3, [r3, #0]
8002c96: 881b ldrh r3, [r3, #0]
8002c98: 4a2b ldr r2, [pc, #172] @ (8002d48 <HTPA_ReadSensor+0x274>)
8002c9a: 009b lsls r3, r3, #2
8002c9c: 589b ldr r3, [r3, r2]
@ -5713,23 +5713,23 @@ void HTPA_ReadSensor(uint32_t dataArray[32]) {
8002cbc: 19da adds r2, r3, r7
8002cbe: 1863 adds r3, r4, r1
8002cc0: 19db adds r3, r3, r7
8002cc2: 781b ldrb r3, [r3, #0]
8002cc2: 881b ldrh r3, [r3, #0]
8002cc4: 8013 strh r3, [r2, #0]
for(uint8_t i = 0; i < NROFTAELEMENTS; i++) {
8002cc6: 2239 movs r2, #57 @ 0x39
for(uint16_t i = 0; i < NROFTAELEMENTS; i++) {
8002cc6: 2238 movs r2, #56 @ 0x38
8002cc8: 2128 movs r1, #40 @ 0x28
8002cca: 1853 adds r3, r2, r1
8002ccc: 19db adds r3, r3, r7
8002cce: 781b ldrb r3, [r3, #0]
8002cce: 881b ldrh r3, [r3, #0]
8002cd0: 1852 adds r2, r2, r1
8002cd2: 19d2 adds r2, r2, r7
8002cd4: 3301 adds r3, #1
8002cd6: 7013 strb r3, [r2, #0]
8002cd8: 2339 movs r3, #57 @ 0x39
8002cd6: 8013 strh r3, [r2, #0]
8002cd8: 2338 movs r3, #56 @ 0x38
8002cda: 2228 movs r2, #40 @ 0x28
8002cdc: 189b adds r3, r3, r2
8002cde: 19db adds r3, r3, r7
8002ce0: 781b ldrb r3, [r3, #0]
8002ce0: 881b ldrh r3, [r3, #0]
8002ce2: 2b06 cmp r3, #6
8002ce4: d9d3 bls.n 8002c8e <HTPA_ReadSensor+0x1ba>
}
@ -7501,9 +7501,9 @@ void TTS_Init(CAN_HandleTypeDef *hcan) {
// initialize values
TTS_LoadTireData();
8003790: f000 fa34 bl 8003bfc <TTS_LoadTireData>
tts_sensorid = TTS_FL;
tts_sensorid = TTS_FR;
8003794: 4b18 ldr r3, [pc, #96] @ (80037f8 <TTS_Init+0x70>)
8003796: 2200 movs r2, #0
8003796: 2201 movs r2, #1
8003798: 701a strb r2, [r3, #0]
tts_carid = FT25;
800379a: 4b18 ldr r3, [pc, #96] @ (80037fc <TTS_Init+0x74>)
@ -7528,7 +7528,7 @@ void TTS_Init(CAN_HandleTypeDef *hcan) {
80037ac: 4b16 ldr r3, [pc, #88] @ (8003808 <TTS_Init+0x80>)
80037ae: 2200 movs r2, #0
80037b0: 609a str r2, [r3, #8]
tts_canHeader.StdId = 0x701;
tts_canHeader.StdId = 0x702;
80037b2: 4b15 ldr r3, [pc, #84] @ (8003808 <TTS_Init+0x80>)
80037b4: 4a15 ldr r2, [pc, #84] @ (800380c <TTS_Init+0x84>)
80037b6: 601a str r2, [r3, #0]
@ -7577,7 +7577,7 @@ void TTS_Init(CAN_HandleTypeDef *hcan) {
8003800: 20000876 .word 0x20000876
8003804: 2000084c .word 0x2000084c
8003808: 20000850 .word 0x20000850
800380c: 00000701 .word 0x00000701
800380c: 00000702 .word 0x00000702
8003810: 20000868 .word 0x20000868
08003814 <TTS_SendCAN>:

View File

@ -38,8 +38,8 @@
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="enable"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.max_halt_delay" value="2"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.reset_strategy" value="connect_under_reset"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value="002100213133511839363430"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.watchdog_config" value="none"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkenable_rtos" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkrestart_configurations" value="{&quot;fVersion&quot;:1,&quot;fItems&quot;:[{&quot;fDisplayName&quot;:&quot;Reset&quot;,&quot;fIsSuppressible&quot;:false,&quot;fResetAttribute&quot;:&quot;Software system reset&quot;,&quot;fResetStrategies&quot;:[{&quot;fDisplayName&quot;:&quot;Software system reset&quot;,&quot;fLaunchAttribute&quot;:&quot;system_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Hardware reset&quot;,&quot;fLaunchAttribute&quot;:&quot;hardware_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset hardware\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Core reset&quot;,&quot;fLaunchAttribute&quot;:&quot;core_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset core\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;None&quot;,&quot;fLaunchAttribute&quot;:&quot;no_reset&quot;,&quot;fGdbCommands&quot;:[],&quot;fCmdOptions&quot;:[&quot;-g&quot;]}],&quot;fGdbCommandGroup&quot;:{&quot;name&quot;:&quot;Additional commands&quot;,&quot;commands&quot;:[]},&quot;fStartApplication&quot;:true}]}"/>