preliminary Sail transfer function
This commit is contained in:
parent
9a6819b83d
commit
2957e7b4f5
2 changed files with 22 additions and 0 deletions
16
keil_project/Services/Sail.c
Normal file
16
keil_project/Services/Sail.c
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#include "Sail.h"
|
||||||
|
#include "Servo.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define SAIL_TRANSFER_FACTOR 1.0
|
||||||
|
#define SAIL_TRANSFER_OFFSET 0
|
||||||
|
|
||||||
|
void SAIL_Init(void)
|
||||||
|
{
|
||||||
|
SERVO_Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SAIL_SetAngle(float angle)
|
||||||
|
{
|
||||||
|
float servo_angle = angle * SAIL_TRANSFER_FACTOR + SAIL_TRANSFER_OFFSET;
|
||||||
|
}
|
6
keil_project/Services/Sail.h
Normal file
6
keil_project/Services/Sail.h
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
void SAIL_Init(void);
|
||||||
|
|
||||||
|
// sets the opening angle of the sail
|
||||||
|
void SAIL_SetAngle(float angle);
|
Loading…
Reference in a new issue