Skip to content

Commit

Permalink
rescale
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed Jan 2, 2024
1 parent 766438a commit d797388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion board/kombi/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ void CAN1_RX0_IRQ_Handler(void) {
dat[i] = GET_BYTE(&CAN1->sFIFOMailBox[0], i);
}
rpm = dat[1] | (uint16_t)(dat[2] << 8); //Read RPM signal
intermediary_rpm = (rpm/80) * 51; //Scale RPM signal for our purposes
intermediary_rpm = (rpm/364) * 255; //Scale RPM signal for our purposes
scaled_rpm = intermediary_rpm/25; //Apply DBC scale factor for cluster
#ifdef DEBUG_CAN
puts("Decoded RPM: ");
Expand Down

0 comments on commit d797388

Please sign in to comment.