Open Storm
Functions
valve.c File Reference

Implements functions for operating valve. More...

#include "valve.h"
Include dependency graph for valve.c:

Functions

int test_valve ()
 Test the valve by opening and closing it. More...
 
float32 read_Valve_POS ()
 Read the current position of the valve. More...
 
int move_valve (int valve)
 Move valve to the position indicated by valve. More...
 
uint8 zip_valve (char *labels[], float readings[], uint8 *array_ix, int *valve_trigger, uint8 max_size)
 Moves first valve and inserts current value of valve_trigger into labels and readings arrays. More...
 
uint8 zip_valve_2 (char *labels[], float readings[], uint8 *array_ix, int *valve_2_trigger, uint8 max_size)
 Moves second valve and inserts current value of valve_2_trigger into labels and readings arrays. More...
 

Detailed Description

Implements functions for operating valve.

Author
Brandon Wong
Version
TODO
Date
2017-06-19

Function Documentation

int move_valve ( int  valve)

Move valve to the position indicated by valve.

Parameters
Positionto move the valve:
  • 0: Completely open
  • 100: Completely closed
  • 1-99: Partially open
Returns
Number of iterations needed to close valve. TODO: Unclear.

Here is the call graph for this function:

float32 read_Valve_POS ( )

Read the current position of the valve.

Returns
Position of the valve as a percent, with 0 meaning completely open and 100 meaning completely closed.

Here is the call graph for this function:

Here is the caller graph for this function:

int test_valve ( )

Test the valve by opening and closing it.

Returns
1

Here is the call graph for this function:

uint8 zip_valve ( char *  labels[],
float  readings[],
uint8 *  array_ix,
int *  valve_trigger,
uint8  max_size 
)

Moves first valve and inserts current value of valve_trigger into labels and readings arrays.

Parameters
labelsArray to store labels corresponding to each trigger result
readingsArray to store trigger results as floating point values
array_ixArray index to label and readings
max_sizeMaximum size of label and reading arrays (number of entries)
Returns
(*array_ix) + number of entries filled

Here is the caller graph for this function:

uint8 zip_valve_2 ( char *  labels[],
float  readings[],
uint8 *  array_ix,
int *  valve_2_trigger,
uint8  max_size 
)

Moves second valve and inserts current value of valve_2_trigger into labels and readings arrays.

Parameters
labelsArray to store labels corresponding to each trigger result
readingsArray to store trigger results as floating point values
array_ixArray index to label and readings
max_sizeMaximum size of label and reading arrays (number of entries)
Returns
(*array_ix) + number of entries filled

Here is the caller graph for this function: