summaryrefslogtreecommitdiff
path: root/digital/beacon/src/laser.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/beacon/src/laser.c')
-rw-r--r--digital/beacon/src/laser.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/digital/beacon/src/laser.c b/digital/beacon/src/laser.c
index 205b60be..232ff229 100644
--- a/digital/beacon/src/laser.c
+++ b/digital/beacon/src/laser.c
@@ -27,6 +27,8 @@
#include <avr/interrupt.h>
#include "debug_avr.h"
#include "laser.h"
+#include "servo.h"
+#include "codewheel.h"
laser_s laser;
@@ -106,8 +108,11 @@ void laser_set_angle(uint16_t angle)
/* Zigbee sending IRQ vector */
ISR(TIMER3_COMPB_vect)
{
-// TIMSK3 &= ~OCIE3B;
-// sei();
+ if(servo_get_state(SERVO_1) == SERVO_SCANNING_FAST_IN_PROGRESS)
+ {
+ codewheel_set_rebase_offset(laser_get_angle());
+ codewheel_set_state(CODEWHEEL_REQUEST_REBASE);
+ }
}