diff --git a/src/CANNode.cpp b/src/CANNode.cpp index 8f41d5d..a6856ab 100644 --- a/src/CANNode.cpp +++ b/src/CANNode.cpp @@ -60,7 +60,8 @@ static uint8_t node_id PROGMEM= { NODE_ID }; static OW_switch_t switches[N_SWITCHES] PROGMEM={ // nick, addr[8], event_tag[sw1, sw2] - { 1, { 0x12, 0x5b, 0x27, 0x50, 0x0, 0x0, 0x0, 0x26 }, { 1, 9 } } + { 1, { 0x12, 0x5b, 0x27, 0x50, 0x0, 0x0, 0x0, 0x26 }, { 1, 10 } }, + { 0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0 } } }; static uint8_t switches_state[N_SWITCHES]; @@ -119,16 +120,6 @@ static action_t action_map[N_ACTIONS] PROGMEM={ {8, 7}, {9, 0},{9, 1},{9, 2},{9, 3},{9, 4},{9, 5},{9, 6},{9, 7}, }; - // tx_events[0].id =0x01; - // tx_events[0].telegram.id = 0x0102DEAD; - // tx_events[0].telegram.len = 2; - // tx_events[0].telegram.buf[0] = 0xDE; - // tx_events[0].telegram.buf[1] = 0xAD; - // tx_events[1].id =0x02; - // tx_events[1].telegram.id = 0x0204BEEF; - // tx_events[1].telegram.len = 4; - // tx_events[1].telegram.buf[0] = 0xDE; - // tx_events[1].telegram.buf[1] = 0xAD; // Initialisation // Misc @@ -332,12 +323,10 @@ void loop(void) if (action[0]) { Serial.println("pioA toggled"); send_event(switches[0].event_tag[0]); - delay(1); } if (action[1]) { Serial.println("pioB toggled"); send_event(switches[0].event_tag[1]); -// delay(1); } } if ( METRO_CAN.check() ) { @@ -348,30 +337,10 @@ void loop(void) --rxTimer; } } -// if ( txmsg.len == 0 && trig_event != 0 ) { - -// for (uint i=0;i