1
0
mirror of https://github.com/halleysfifthinc/Toyota-AVC-LAN synced 2025-06-07 16:06:12 +00:00

Fix printBinary flag

This commit is contained in:
Allen Hill 2023-09-16 16:31:08 -04:00
parent 0fe2f64eed
commit 1d6690a234
2 changed files with 8 additions and 15 deletions

View File

@ -130,6 +130,7 @@ uint16_t HU_ID;
uint8_t printAllFrames; uint8_t printAllFrames;
uint8_t verbose; uint8_t verbose;
uint8_t printBinary;
uint8_t playMode; uint8_t playMode;

View File

@ -25,6 +25,7 @@
#include <avr/sfr_defs.h> #include <avr/sfr_defs.h>
#include <avr/xmega.h> #include <avr/xmega.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
#include "avclandrv.h" #include "avclandrv.h"
#include "com232.h" #include "com232.h"
@ -48,7 +49,7 @@ int main() {
uint8_t s_dig = 0; uint8_t s_dig = 0;
uint8_t s_c[2]; uint8_t s_c[2];
uint8_t i; uint8_t i;
uint8_t data_tmp[32]; uint8_t data_tmp[MAXMSGLEN];
AVCLAN_frame_t msg = { AVCLAN_frame_t msg = {
.broadcast = UNICAST, .broadcast = UNICAST,
.controller_addr = CD_ID, .controller_addr = CD_ID,
@ -155,26 +156,16 @@ int main() {
break; break;
case 'b': case 'b':
case 'B': // Beep case 'B': // Beep
data_tmp[0] = 0x00; answerReq = cm_Beep;
data_tmp[1] = 0x5E; AVCLan_SendAnswer();
data_tmp[2] = 0x29;
data_tmp[3] = 0x60;
data_tmp[4] = 0x01;
s_len = 5;
msg.length = s_len;
msg.broadcast = UNICAST;
msg.controller_addr = 0x110;
msg.peripheral_addr = 0x440;
AVCLAN_sendframe(&msg);
break; break;
case 'e': // Beep case 'e': // Beep
data_tmp[0] = 0x00; data_tmp[0] = 0x00;
data_tmp[1] = 0x01; data_tmp[1] = 0x01;
data_tmp[2] = 0x11; data_tmp[2] = 0x11;
data_tmp[3] = 0x45; data_tmp[3] = 0x50;
data_tmp[4] = 0x63; data_tmp[4] = 0x63;
s_len = 5; msg.length = 5;
msg.length = s_len;
msg.broadcast = UNICAST; msg.broadcast = UNICAST;
msg.controller_addr = CD_ID; msg.controller_addr = CD_ID;
msg.peripheral_addr = HU_ID; msg.peripheral_addr = HU_ID;
@ -253,6 +244,7 @@ void Setup() {
printAllFrames = 1; printAllFrames = 1;
echoCharacters = 1; echoCharacters = 1;
readBinary = 0; readBinary = 0;
printBinary = 0;
_PROTECTED_WRITE(CLKCTRL.MCLKCTRLB, (CLK_PRESCALE | CLK_PRESCALE_DIV)); _PROTECTED_WRITE(CLKCTRL.MCLKCTRLB, (CLK_PRESCALE | CLK_PRESCALE_DIV));