Skip to content

Commit 39e0091

Browse files
committed
Bugfix for error at compiling other display
1 parent e69e797 commit 39e0091

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Src/display_No_2.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2626
#include "stm32f1xx_hal.h"
2727
#include "print.h"
2828

29-
#if (DISPLAY_TYPE_NO2)
29+
3030

3131
UART_HandleTypeDef huart1;
32+
#if (DISPLAY_TYPE == DISPLAY_TYPE_NO2)
3233

3334
void No2_Service(No2_t* No2_ctx);
3435
int calculate_checksum(unsigned char* frame_buf, uint8_t length);
@@ -118,7 +119,8 @@ void No2_Service(No2_t* No2_ctx)
118119

119120
TxBuffer[3]=No2_ctx->Tx.Error;
120121
TxBuffer[4]=No2_ctx->Tx.BrakeActive<<5;//0b00100000;
121-
122+
//No2_ctx->Tx.Wheeltime_ms=1000;
123+
//No2_ctx->Tx.Current_x10=8000;
122124
TxBuffer[6]=highByte(No2_ctx->Tx.Current_x10);
123125
TxBuffer[7]=lowByte(No2_ctx->Tx.Current_x10);
124126
TxBuffer[8]=highByte(No2_ctx->Tx.Wheeltime_ms);
@@ -140,7 +142,7 @@ void No2_Service(No2_t* No2_ctx)
140142

141143

142144

143-
#endif
145+
144146

145147
uint8_t lowByte(uint16_t word){
146148
return word & 0xFF;
@@ -161,3 +163,4 @@ int calculate_checksum(unsigned char* frame_buf, uint8_t length) {
161163
}
162164
return(xor);
163165
}
166+
#endif

0 commit comments

Comments
 (0)