Permalink
Browse files

Controle AX12

  • Loading branch information...
1 parent def5219 commit 742d6754e69c0a43034bebf78ada92a6bdfb79b4 Florent Thévenet committed Mar 18, 2012
@@ -0,0 +1,18 @@
+#!/usr/bin/python3
+# -*- coding:utf-8 -*-
+
+
+import sys
+import os
+FILE_DIR = os.path.dirname(os.path.abspath(__file__))
+sys.path.append(os.path.join(FILE_DIR,"..","..","clientIRC"))
+
+import arduinobot
+
+if __name__ == "__main__":
+ arduinobot.run(
+ nickname="petit_robot", # nom du bot
+ channel="#tests_flo", # canal sur lequel se connecter
+ serial_port="/dev/ttyACM0", # port de l'arduino
+ protocol_file=os.path.join(FILE_DIR,"..","driver","protocole.h"), # où trouver le protocole.h
+ protocol_prefixe="Q_") # préfix des commandes dans le protocole
@@ -0,0 +1,29 @@
+*** build/core/HardwareSerial.cpp 2011-02-16 16:56:11.000000000 +0100
+--- build/core_patched/HardwareSerial.cpp 2012-03-17 16:40:47.763109790 +0100
+***************
+*** 134,150 ****
+ #error No interrupt handler for usart 0
+ #endif
+
+! //#if defined(SIG_USART1_RECV)
+! #if defined(USART1_RX_vect)
+! //SIGNAL(SIG_USART1_RECV)
+! SIGNAL(USART1_RX_vect)
+! {
+! unsigned char c = UDR1;
+! store_char(c, &rx_buffer1);
+! }
+! #elif defined(SIG_USART1_RECV)
+! #error SIG_USART1_RECV
+! #endif
+
+ #if defined(USART2_RX_vect) && defined(UDR2)
+ SIGNAL(USART2_RX_vect)
+--- 134,140 ----
+ #error No interrupt handler for usart 0
+ #endif
+
+!
+
+ #if defined(USART2_RX_vect) && defined(UDR2)
+ SIGNAL(USART2_RX_vect)
@@ -0,0 +1,23 @@
+*** build/core/HardwareSerial.cpp 2012-03-08 01:35:47.238186503 +0100
+--- build/core_patched/HardwareSerial.cpp 2012-03-08 01:48:59.190113574 +0100
+***************
+*** 120,137 ****
+ #endif
+ #endif
+
+- #if defined(USART1_RX_vect)
+- void serialEvent1() __attribute__((weak));
+- void serialEvent1() {}
+- #define serialEvent1_implemented
+- SIGNAL(USART1_RX_vect)
+- {
+- unsigned char c = UDR1;
+- store_char(c, &rx_buffer1);
+- }
+- #elif defined(SIG_USART1_RECV)
+- #error SIG_USART1_RECV
+- #endif
+
+ #if defined(USART2_RX_vect) && defined(UDR2)
+ void serialEvent2() __attribute__((weak));
+--- 120,125 ----
Oops, something went wrong.

0 comments on commit 742d675

Please sign in to comment.