/elec/quadcopter

To get this branch, use:
bzr branch http://bzr.ed.am/elec/quadcopter

« back to all changes in this revision

Viewing changes to src/rc-interface/motors.cc

  • Committer: Tim Marston
  • Date: 2014-02-05 20:30:43 UTC
  • Revision ID: tim@ed.am-20140205203043-mkxrtvjww6cte95n
updated rc-interface comments

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
#include "motors.h"
7
7
#include "config.h"
8
 
#include "common.h"
9
8
#include <Arduino.h>
10
9
#include <limits.h>
11
10
 
74
73
                //      Serial.println( width );
75
74
                // }
76
75
        }
77
 
 
78
 
        // else, if an event is coming up soon, sleep and service the event to make
79
 
        // sure that no other code runs and blocks us!
80
 
        else
81
 
        {
82
 
                long delay = calculate_duration( now, next_event_at );
83
 
                if( delay < 250 )
84
 
                {
85
 
                        if( delay > 20 )
86
 
                                delayMicroseconds( delay - 20 );
87
 
                        update();
88
 
                }
89
 
        }
90
 
        
91
76
}