diff Discovery/Src/tComm.c @ 1022:ca713e199f22 GasConsumption

Add model ID 0x44 for the OSTC5 to the 0x60 (HARDWARE2) endpoint. The OSTC4 stays at model ID 0x43. (mikeller)
author heinrichsweikamp
date Sun, 29 Jun 2025 13:45:56 +0200
parents 5924a2d1d3ba
children 158100a84ebd
line wrap: on
line diff
--- a/Discovery/Src/tComm.c	Fri Jun 20 09:05:33 2025 +0200
+++ b/Discovery/Src/tComm.c	Sun Jun 29 13:45:56 2025 +0200
@@ -1070,16 +1070,20 @@
     // get model + features
     case 0x60:
         aTxBuffer[count++] = 0x00; // hardware descriptor HIGH byte
-        aTxBuffer[count++] = 0x3B; // hardware descriptor LOW byte // 0x3B is OSTC4 //  0x1A is OTSC3
+        aTxBuffer[count++] = 0x3B; // hardware descriptor LOW byte // 0x3B is OSTC 4/5 //  0x1A is OTSC3
         aTxBuffer[count++] = 0x00; // feature descriptor HIGH byte
         aTxBuffer[count++] = 0x00; // feature descriptor LOW byte
-        aTxBuffer[count++] = 0x43; // model id
+        if (isNewDisplay()) {
+            aTxBuffer[count++] = 0x44; // model id OSTC5
+        } else {
+            aTxBuffer[count++] = 0x43; // model id OSTC4
+        }
         aTxBuffer[count++] = prompt4D4C(receiveStartByteUart);
         break;
 
     // get model
     case 0x6A:
-        aTxBuffer[count++] = 0x3B; // 0x3B is OSTC4 //  0x1A is OTSC3
+        aTxBuffer[count++] = 0x3B; // 0x3B is OSTC 4/5 //  0x1A is OTSC3
         aTxBuffer[count++] = prompt4D4C(receiveStartByteUart);
         break;