Anti-Sway Capstone 1.0
|
Idle Mode Implementation. More...
#include <stdbool.h>
#include <pthread.h>
#include <stdint.h>
#include <stdlib.h>
#include "T1.h"
#include "setup.h"
#include "io.h"
#include "thread-lib.h"
#include "discrete-lib.h"
#include "idle.h"
Macros | |
#define | DECIMAL_PRECISION "3" |
#define | RAD_2_DEG(value) value * 180.0 / PI |
Functions | |
static void * | IdleModeThread (void *resource) |
Idle Mode Thread Function. | |
int | IdleFork () |
int | IdleJoin () |
Variables | |
pthread_t | idle_thread |
Thread ID. | |
ThreadResource | resource |
Thread Resources (Shared Resources) | |
static int | error |
Local Error Code. | |
Idle Mode Implementation.
int IdleFork | ( | ) |
Executes Idle Mode (concurrently), so we see how badly we messed up our code/sensors
int IdleJoin | ( | ) |
Stops Idle Mode (concurrent process) and our pain
|
static |
Idle Mode Thread Function.
The Thread Function for Idle Mode
resource | A pointer to a Resource sturcture for Idle Mode |
How many decimal places to include
Radians to Degrees Conversion Factor