mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-11 19:24:10 +01:00
Add a scale to the logo
This commit is contained in:
parent
6ca34d3d0c
commit
ac99176f73
@ -341,12 +341,14 @@ static void createPathBox()
|
|||||||
|
|
||||||
static void createPathLogo()
|
static void createPathLogo()
|
||||||
{
|
{
|
||||||
|
float scale = 1;
|
||||||
|
|
||||||
// Draw O
|
// Draw O
|
||||||
WaypointData waypoint;
|
WaypointData waypoint;
|
||||||
waypoint.Velocity[0] = 2; // Since for now this isn't directional just set a mag
|
waypoint.Velocity[0] = 2; // Since for now this isn't directional just set a mag
|
||||||
for(uint32_t i = 0; i < 20; i++) {
|
for(uint32_t i = 0; i < 20; i++) {
|
||||||
waypoint.Position[1] = 30 * cos(i / 19.0 * 2 * M_PI);
|
waypoint.Position[1] = scale * 30 * cos(i / 19.0 * 2 * M_PI);
|
||||||
waypoint.Position[0] = 50 * sin(i / 19.0 * 2 * M_PI);
|
waypoint.Position[0] = scale * 50 * sin(i / 19.0 * 2 * M_PI);
|
||||||
waypoint.Position[2] = -50;
|
waypoint.Position[2] = -50;
|
||||||
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
||||||
WaypointCreateInstance();
|
WaypointCreateInstance();
|
||||||
@ -355,59 +357,59 @@ static void createPathLogo()
|
|||||||
|
|
||||||
// Draw P
|
// Draw P
|
||||||
for(uint32_t i = 20; i < 35; i++) {
|
for(uint32_t i = 20; i < 35; i++) {
|
||||||
waypoint.Position[1] = 55 + 20 * cos(i / 10.0 * M_PI - M_PI / 2);
|
waypoint.Position[1] = scale * (55 + 20 * cos(i / 10.0 * M_PI - M_PI / 2));
|
||||||
waypoint.Position[0] = 25 + 25 * sin(i / 10.0 * M_PI - M_PI / 2);
|
waypoint.Position[0] = scale * (25 + 25 * sin(i / 10.0 * M_PI - M_PI / 2));
|
||||||
waypoint.Position[2] = -50;
|
waypoint.Position[2] = -50;
|
||||||
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
||||||
WaypointCreateInstance();
|
WaypointCreateInstance();
|
||||||
bad_inits += (WaypointInstSet(i, &waypoint) != 0);
|
bad_inits += (WaypointInstSet(i, &waypoint) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
waypoint.Position[1] = 35;
|
waypoint.Position[1] = scale * 35;
|
||||||
waypoint.Position[0] = -50;
|
waypoint.Position[0] = scale * -50;
|
||||||
waypoint.Position[2] = -50;
|
waypoint.Position[2] = -50;
|
||||||
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
||||||
WaypointCreateInstance();
|
WaypointCreateInstance();
|
||||||
WaypointInstSet(35, &waypoint);
|
WaypointInstSet(35, &waypoint);
|
||||||
|
|
||||||
// Draw Box
|
// Draw Box
|
||||||
waypoint.Position[1] = 35;
|
waypoint.Position[1] = scale * 35;
|
||||||
waypoint.Position[0] = -60;
|
waypoint.Position[0] = scale * -60;
|
||||||
waypoint.Position[2] = -30;
|
waypoint.Position[2] = -30;
|
||||||
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
||||||
WaypointCreateInstance();
|
WaypointCreateInstance();
|
||||||
WaypointInstSet(36, &waypoint);
|
WaypointInstSet(36, &waypoint);
|
||||||
|
|
||||||
waypoint.Position[1] = 85;
|
waypoint.Position[1] = scale * 85;
|
||||||
waypoint.Position[0] = -60;
|
waypoint.Position[0] = scale * -60;
|
||||||
waypoint.Position[2] = -30;
|
waypoint.Position[2] = -30;
|
||||||
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
||||||
WaypointCreateInstance();
|
WaypointCreateInstance();
|
||||||
WaypointInstSet(37, &waypoint);
|
WaypointInstSet(37, &waypoint);
|
||||||
|
|
||||||
waypoint.Position[1] = 85;
|
waypoint.Position[1] = scale * 85;
|
||||||
waypoint.Position[0] = 60;
|
waypoint.Position[0] = scale * 60;
|
||||||
waypoint.Position[2] = -30;
|
waypoint.Position[2] = -30;
|
||||||
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
||||||
WaypointCreateInstance();
|
WaypointCreateInstance();
|
||||||
WaypointInstSet(38, &waypoint);
|
WaypointInstSet(38, &waypoint);
|
||||||
|
|
||||||
waypoint.Position[1] = -40;
|
waypoint.Position[1] = scale * -40;
|
||||||
waypoint.Position[0] = 60;
|
waypoint.Position[0] = scale * 60;
|
||||||
waypoint.Position[2] = -30;
|
waypoint.Position[2] = -30;
|
||||||
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
||||||
WaypointCreateInstance();
|
WaypointCreateInstance();
|
||||||
WaypointInstSet(39, &waypoint);
|
WaypointInstSet(39, &waypoint);
|
||||||
|
|
||||||
waypoint.Position[1] = -40;
|
waypoint.Position[1] = scale * -40;
|
||||||
waypoint.Position[0] = -60;
|
waypoint.Position[0] = scale * -60;
|
||||||
waypoint.Position[2] = -30;
|
waypoint.Position[2] = -30;
|
||||||
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
||||||
WaypointCreateInstance();
|
WaypointCreateInstance();
|
||||||
WaypointInstSet(40, &waypoint);
|
WaypointInstSet(40, &waypoint);
|
||||||
|
|
||||||
waypoint.Position[1] = 35;
|
waypoint.Position[1] = scale * 35;
|
||||||
waypoint.Position[0] = -60;
|
waypoint.Position[0] = scale * -60;
|
||||||
waypoint.Position[2] = -30;
|
waypoint.Position[2] = -30;
|
||||||
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
||||||
WaypointCreateInstance();
|
WaypointCreateInstance();
|
||||||
|
Loading…
Reference in New Issue
Block a user