From 90527d1cf27582b1e7bb8588afbed8989453f606 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Sat, 21 Apr 2012 16:42:16 +0200 Subject: digital/beacon: split sensors.* into codewheel.* & laser.* and modify dedicated calls --- digital/beacon/src/debug.c | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) (limited to 'digital/beacon/src/debug.c') diff --git a/digital/beacon/src/debug.c b/digital/beacon/src/debug.c index 42fc0e29..fb2cf589 100644 --- a/digital/beacon/src/debug.c +++ b/digital/beacon/src/debug.c @@ -29,11 +29,13 @@ #include "calibration.h" #include "debug.h" #include "servo.h" -#include "sensors.h" +#include "codewheel.h" +#include "laser.h" #include "network.h" HAL_UsartDescriptor_t appUsartDescriptor; // USART descriptor (required by stack) HAL_AppTimer_t debugTimer; // TIMER descripor used by the DEBUG task +HAL_AppTimer_t wheelTimer; // TIMER descripor used by the DEBUG task uint8_t usartRxBuffer[APP_USART_RX_BUFFER_SIZE]; // USART Rx buffer uint8_t usartTxBuffer[APP_USART_TX_BUFFER_SIZE]; // USART Tx buffer @@ -111,13 +113,13 @@ void usartRXCallback(uint16_t bytesToRead) uprintf("SERVO_2 = %d\r\n",servo_angle_decrease(SERVO_2)); break; case 'a': - uprintf("CodeWheel Value = %d\r\n",sensors_codewheel_get_value()); + uprintf("CodeWheel Value = %d\r\n",codewheel_get_value()); break; case 'd': debug_start_stop_task(); break; case 'z': - sensors_codewheel_reset(); + codewheel_reset(); break; case 'c': calibration_start_stop_task(); @@ -125,6 +127,15 @@ void usartRXCallback(uint16_t bytesToRead) case 'q': calibration_set_laser_flag(SET); break; + case 'w': +// wheel_start_stop_task(); +// uprintf("TCNT3 = %d\r\n",TCNT3); + TIMSK3 &= ~(1<