microbit: changes to the default servo range
Previously the range of the servo API was incorrect and would only translate to a range 0 degrees - 90 degrees in the real world. This patch updates the #defines used in the servo api default calculation to calibrate for the intended range of 0 - 180 degrees. This was all due to working from a specification that applied to a subset of servos.
This commit is contained in:
parent
5ec546980b
commit
aa7ce13e58
1 changed files with 2 additions and 2 deletions
|
@ -35,8 +35,8 @@
|
|||
#define MICROBIT_PIN_MAX_OUTPUT 1023
|
||||
|
||||
#define MICROBIT_PIN_MAX_SERVO_RANGE 180
|
||||
#define MICROBIT_PIN_DEFAULT_SERVO_RANGE 1000
|
||||
#define MICROBIT_PIN_DEFAULT_SERVO_CENTER MICROBIT_PIN_DEFAULT_SERVO_RANGE + MICROBIT_PIN_DEFAULT_SERVO_RANGE/2
|
||||
#define MICROBIT_PIN_DEFAULT_SERVO_RANGE 2000
|
||||
#define MICROBIT_PIN_DEFAULT_SERVO_CENTER 1500
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue