Skip to content

Commit

Permalink
Bugfix for error at compiling other display
Browse files Browse the repository at this point in the history
  • Loading branch information
stancecoke committed Nov 3, 2024
1 parent e69e797 commit 39e0091
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Src/display_No_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stm32f1xx_hal.h"
#include "print.h"

#if (DISPLAY_TYPE_NO2)


UART_HandleTypeDef huart1;
#if (DISPLAY_TYPE == DISPLAY_TYPE_NO2)

void No2_Service(No2_t* No2_ctx);
int calculate_checksum(unsigned char* frame_buf, uint8_t length);
Expand Down Expand Up @@ -118,7 +119,8 @@ void No2_Service(No2_t* No2_ctx)

TxBuffer[3]=No2_ctx->Tx.Error;
TxBuffer[4]=No2_ctx->Tx.BrakeActive<<5;//0b00100000;

//No2_ctx->Tx.Wheeltime_ms=1000;
//No2_ctx->Tx.Current_x10=8000;
TxBuffer[6]=highByte(No2_ctx->Tx.Current_x10);
TxBuffer[7]=lowByte(No2_ctx->Tx.Current_x10);
TxBuffer[8]=highByte(No2_ctx->Tx.Wheeltime_ms);
Expand All @@ -140,7 +142,7 @@ void No2_Service(No2_t* No2_ctx)



#endif


uint8_t lowByte(uint16_t word){
return word & 0xFF;
Expand All @@ -161,3 +163,4 @@ int calculate_checksum(unsigned char* frame_buf, uint8_t length) {
}
return(xor);
}
#endif

0 comments on commit 39e0091

Please sign in to comment.