|
fwwasm
|
Free-Wili wasm export header Functions that are exposed from the WASM engine for use in Free-Wili WASM scripts. More...
Go to the source code of this file.
Macros | |
| #define | WASM_IMPORT(NAME) |
| #define | WASM_EXPORT extern "C" __attribute__((used)) __attribute__((visibility("default"))) |
| #define | WASM_EXPORT_AS(NAME) |
| #define | FWGUI_EVENT_NUMTYPE_INT 1 |
| #define | FWGUI_EVENT_NUMTYPE_UINT 2 |
| #define | FWGUI_EVENT_NUMTYPE_FLOAT 3 |
| #define | FW_GET_EVENT_DATA_MAX 34 |
Typedefs | |
| typedef enum _FWGuiEventType | FWGuiEventType |
| typedef enum _LEDManagerLEDMode | LEDManagerLEDMode |
| typedef enum _ePanelColorLED | ePanelColorLED |
| typedef enum _ePanelSizeLED | ePanelSizeLED |
| typedef enum _printOutDataType | printOutDataType |
| typedef enum _printOutColor | printOutColor |
| typedef enum _audiowavetype | audioWaveType |
| typedef enum _controlProperty | controlProperty |
| typedef enum _WILEyeFileDestination | WILEyeFileDestination |
| typedef enum _WILEyeZoomLevel | WILEyeZoomLevel |
| typedef enum _WILEyeResolution | WILEyeResolution |
Functions | |
| void | waitms (int milliseconds) WASM_IMPORT("waitms") |
| wait for a number of milliseconds | |
| int | wilirand (void) WASM_IMPORT("wilirand") |
| return a random postive 32 bit integer | |
| unsigned int | millis (void) WASM_IMPORT("millis") |
| return number of milliseconds since boot | |
| void | setIO (int io, int on) WASM_IMPORT("setIO") |
| set the state of a GPIO | |
| unsigned int | getIO (int io) WASM_IMPORT("getIO") |
| get the state of a GPIO | |
| unsigned int | getAllIO (void) WASM_IMPORT("getAllIO") |
| get the state of all GPIO | |
| int | i2cRead (int address, int reg, unsigned char *data, int length) WASM_IMPORT("i2cRead") |
| read from an I2C device | |
| int | i2cWrite (int address, int reg, unsigned char *data, int length) WASM_IMPORT("i2cWrite") |
| write to an I2C device | |
| int | SPIReadWrite (unsigned char *data_in, int length, unsigned char *data_out) WASM_IMPORT("SPIReadWrite") |
| read and write data over SPI | |
| int | canfdTransmit (int channel, int id, int isXtd, int isCanfd, unsigned char *data, int length) WASM_IMPORT("canfdTransmit") |
| transmit a can or canfd frame | |
| void | terminalWrite (char *szText) WASM_IMPORT("terminalWrite") |
| performs a terminal command as if in the root menu (main only) | |
| int | UARTDataRxCount (void) WASM_IMPORT("UARTDataRxCount") |
| Get the number of bytes in the UART receive buffer. | |
| int | UARTDataRead (unsigned char *data, int length) WASM_IMPORT("UARTDataRead") |
| read data from the UART | |
| int | UARTDataWrite (unsigned char *data, int length) WASM_IMPORT("UARTDataWrite") |
| write data to the UART | |
| int | PWMSetFreqDuty (int io, float freq_hz, float duty) WASM_IMPORT("PWMSetFreqDuty") |
| set the frequency and duty cycle of a PWM pin | |
| int | PWMStop (int io) WASM_IMPORT("PWMStop") |
| stop PWM on a GPIO pin | |
| int | RadioWrite (int index, unsigned char *data, int length) WASM_IMPORT("RadioWrite") |
| write data to a radio | |
| int | RadioRead (int index, unsigned char *data, int length) WASM_IMPORT("RadioRead") |
| read data from a radio | |
| int | RadioGetRxCount (int index) WASM_IMPORT("RadioGetRxCount") |
| get the number of bytes in the radio receive buffer | |
| int | RadioLoadConfig (int index, unsigned char *data, int length) WASM_IMPORT("RadioLoadConfig") |
| int | RadioTxSubFile (int index, const char *sub_file) WASM_IMPORT("RadioTxSubFile") |
| Transmit a sub file to a radio. | |
| int | RadioSetTx (int index) WASM_IMPORT("RadioSetTx") |
| Transmits a sub file to a radio. This function is non-blocking, see RadioSubFileIsTransmitting(). | |
| int | RadioSetRx (int index) WASM_IMPORT("RadioSetRx") |
| set the radio to receive | |
| int | RadioSetIdle (int index) WASM_IMPORT("RadioSetIdle") |
| set the radio to idle | |
| int | RadioGetRSSI (int index) WASM_IMPORT("RadioGetRSSI") |
| get the RSSI of the radio | |
| int | RadioGetLQI (int index) WASM_IMPORT("RadioGetLQI") |
| get the LQI of the radio | |
| int | RadioSubFileIsTransmitting (void) WASM_IMPORT("RadioSubFileIsTransmitting") |
| check if the radio is currently transmitting | |
| void | RadioSubFileStop (void) WASM_IMPORT("RadioSubFileStop") |
| Stop a sub-file transmission started with RadioTxSubFile(). | |
| int | RadioScan (int index, int RssiThreshold, unsigned int *FoundPeak, unsigned int *FrequencyResult, int *RssiResult) WASM_IMPORT("RadioScan") |
| Performs a Frequency Scan on supported frequency and reports the frequency that surpassed the Rssi threshold. | |
| void | sendIRData (unsigned int data) WASM_IMPORT("sendIRData") |
| send IR data | |
| void | setBoardLED (int led_index, int red, int green, int blue, int duration_ms, LEDManagerLEDMode mode) WASM_IMPORT("setBoardLED") |
| set the state of the tri-color LEDs | |
| void | setLEDShowMode (int mode) WASM_IMPORT("setLEDShowMode") |
| set the show mode of the LEDs. | |
| void | playSoundFromFile (const char *file_name) WASM_IMPORT("playSoundFromFile") |
| void | playSoundTextToSpeech (const char *text) WASM_IMPORT("playSoundTextToSpeech") |
| void | playSoundFromNameOrID (const char *name, int id) WASM_IMPORT("playSoundFromNameOrID") |
| void | playSoundFromNumber (int bFloat, int iNumber, float fNumber, int iFloatDigits) WASM_IMPORT("playSoundFromNumber") |
| void | playSoundFromFrequencyAndDuration (float frequency, float duration, float amplitude, audioWaveType wavetype) WASM_IMPORT("playSoundFromFrequencyAndDuration") |
| Plays a tone of specified frequency and duration. | |
| int | openFile (const char *file_name, int mode) WASM_IMPORT("OpenFile") |
| int | closeFile (int handle) WASM_IMPORT("closeFile") |
| int | writeFile (int handle, unsigned char *data, int data_bytes) WASM_IMPORT("writeFile") |
| int | preAllocateSpaceForFile (int handle, int size_in_bytes) WASM_IMPORT("preAllocateSpaceForFile") |
| int | readFile (int handle, unsigned char *data, int *data_bytes) WASM_IMPORT("readFile") |
| int | readFileLine (int handle, char *data, int *data_bytes) WASM_IMPORT("readFileLine") |
| int | setFilePosition (int handle, int position) WASM_IMPORT("setFilePosition") |
| int | getFilePosition (int handle) WASM_IMPORT("getFilePosition") |
| int | getFileSize (int handle) WASM_IMPORT("getFileSize") |
| int | renameFileOrDirectory (const char *name, const char *new_name) WASM_IMPORT("renameFileOrDirectory") |
| int | fileExists (const char *file_name) WASM_IMPORT("fileExists") |
| int | makeDirectory (const char *file_name) WASM_IMPORT("makeDirectory") |
| int | changeDirectory (const char *file_name) WASM_IMPORT("changeDirectory") WASM_IMPORT("changeDirectory") |
| int | getDirectoryItemByIndex (const char *directory, const char *file_name, int include_extension, int index) WASM_IMPORT("getDirectoryItemByIndex") |
| void | getVolumeInfo (int *free, int *total) WASM_IMPORT("getVolumeInfo") |
| int | removeFileOrDirectory (const char *file_name) WASM_IMPORT("removeFileOrDirectory") |
| int | getEventData (unsigned char *data) WASM_IMPORT("getEventData") |
| get the data from the event queue | |
| int | hasEvent (void) WASM_IMPORT("hasEvent") |
| check if there are events in the queue. | |
| void | addPanel (int panel, int visible, int in_rotation, int use_tile, int tile_id, int bg_red, int bg_green, int bg_blue, int show_menu) WASM_IMPORT("addPanel") |
| Add a new blank panel. | |
| void | addPanelPickList (int panel, const char *szCaption, int iTileID, int iIconID, unsigned char iRBack, unsigned char iGBack, unsigned iBBack, unsigned char iRFore, unsigned char iGFore, unsigned iBFore, int iLogIndex) WASM_IMPORT("addPanelPickList") |
| a picklist is a type of panel that presents a list for selection | |
| void | setPanelMenuText (int panel, int iButtonGreyFromZero, const char *message) WASM_IMPORT("setPanelMenuText") |
| configures text for the bottom screen button menu | |
| void | addControlLED (int index, int iControlIndex, int iX, int iY, ePanelColorLED iColor, ePanelSizeLED iSize, int iIntialState) WASM_IMPORT("addControlLED") |
| void | setListItemText (int iLogIndex, int iListIndex, const char *szText) WASM_IMPORT("setListItemText") |
| void | setListItemSelected (int iLogIndex, int iListIndex) |
| void | setListItemTopIndex (int iLogIndex, int iListIndex) |
| void | clearLogOrPlotData (int iLogIndexPlusOne, int iPlotIndexPlusOne) WASM_IMPORT("clearLogOrPlotData") |
| void | addControlLogList (int index, int iControlIndex, int visible, int iLog, int iX, int iY, int iWidth, int iHeight, int iFontType, int iFontSize, int iR, int iG, int iB, int iRFont, int iGFont, int iBFont, int iListMode) WASM_IMPORT("addControlLogList") |
| void | addControlPlotXAxis (int index, int iControlIndex, int iScrollMode, unsigned long long iTimeMin, unsigned long long iTimeMax) WASM_IMPORT("addControlPlotXAxis") |
| void | addControlPlotData (int plotline, int r, int g, int b) WASM_IMPORT("addControlPlotData") |
| Configures an indivual plot in a plot control. | |
| void | addControlPlot (int panel, int control, int visible, int plotDataBitField, int x, int y, int width, int height, int min, int max, int r, int g, int b) WASM_IMPORT("addControlPlot") |
| Add a plot to a panel. | |
| void | addControlNumber (int panel, int control, int visible, int x, int y, int width, int fontSize, int fontType, int r, int g, int b, int isFloat, int floatDigits, int isHexFormat, int isUnsigned) WASM_IMPORT("addControlNumber") |
| Add a number display to a panel. | |
| void | addControlPicture (int panel, int control, int x, int y, int pictureID, int visible) WASM_IMPORT("addControlPicture") |
| Add a picture display to a panel from ROM assets. | |
| void | addControlText (int panel, int control, int x, int y, int fontType, int fontSize, int r, int g, int b, const char *text_value) WASM_IMPORT("addControlText") |
| Add a text control to a panel. | |
| void | addControlBargraph (int panel, int control, int visible, int x, int y, int width, int height, int min, int max, int r, int g, int b) WASM_IMPORT("addControlBargraph") |
| Add a bargraph control to a panel. | |
| void | addControlButton (int panel, int control, int visible, int x, int y, int width, int height, int r, int g, int b, int rFont, int gFont, int bFont, const char *text) WASM_IMPORT("addControlButton") |
| Add a button control to a panel. | |
| void | setControlValueMinMax (int panel, int control, int enable, int min, int max) WASM_IMPORT("setControlValueMinMax") |
| Add numeric limits to a control. | |
| void | setControlValueMinMaxF (int panel, int control, int enable, float min, float max) WASM_IMPORT("setControlValueMinMaxF") |
| Add numeric float limits to a control. | |
| void | setLogDataText (int log, const char *text) WASM_IMPORT("setLogDataText") |
| Add text to a Log. | |
| void | setPlotData (int plot, int settings, int value) WASM_IMPORT("setPlotData") |
| Add data to a plot. | |
| void | setControlValue (int panel, int control, int value) WASM_IMPORT("setControlValue") |
| Sets a controls value property to an integer value. | |
| void | setControlValueFloat (int panel, int control, float value) WASM_IMPORT("setControlValueFloat") |
| Sets a controls value property to an float value. | |
| void | setControlValueText (int panel, int control, const char *text) WASM_IMPORT("setControlValueText") |
| Sets a controls value property to an float value. | |
| void | setCanDisplayReactToButtons (int CanReactToButtons) WASM_IMPORT("setCanDisplayReactToButtons") |
| Instructs the display processor to not sink any of the button events first. | |
| void | exitToMainAppMenu (void) WASM_IMPORT("exitToMainAppMenu") |
| exit to the main app menu | |
| void | showPanel (int panel) WASM_IMPORT("showPanel") |
| Show a panel. | |
| void | addControlPictureFromFile (int panel, int control, int x, int y, const char *file_name, int visible) WASM_IMPORT("addControlPictureFromFile") |
| add a picture control from a file to a panel | |
| void | printInt (const char *szFormatSpec, printOutColor iColor, printOutDataType iDataType, int iDataValue) WASM_IMPORT("printInt") |
| void | printFloat (const char *szFormatSpec, printOutColor iColor, float fDataItem) WASM_IMPORT("printFloat") |
| void | setAudioSettings (int bStreamMic, int bStreamFFT, int bEnableMicPlotData, int iMICPlotDataIndex, int bEnableFFTPlotData, int iFFTPlotDataIndex) WASM_IMPORT("setAudioSettings") |
| int | loadFPGAFromFile (const char *file_name) WASM_IMPORT("loadFPGAFromFile") |
| int | runZoomIOScript (const char *szScript) WASM_IMPORT("runZoomIOScript") |
| void | getRTC (void) WASM_IMPORT("getRTC") |
| void | setSensorSettings (int bStreamAccel, int bStreamTemp, int iRateMilliseconds, int bEnableAccelXPlotData, int iAccelXPlotDataIndex, int bEnableAccelYPlotData, int iAccelYPlotDataIndex, int bEnableAccelZPlotData, int iAccelZPlotDataIndex, int bEnableTempPlotDataC, int iTempPlotDataIndexC, int bEnableTempPlotDataF, int iTempPlotDataIndexF) WASM_IMPORT("setSensorSettings") |
| void | setAppLogSettings (int bLogIRCodes, int bLogAccel, int bLogTempC, int bLogTempF, int iLogIndex) WASM_IMPORT("setAppLogSettings") |
| void | showDialogMsgBox (const char *text, int show_ok, int show_ok_cancel, int show_none, int picture, int auto_close_half_sec) WASM_IMPORT("showDialogMsgBox") |
| shows a modal message box to user | |
| void | showDialogProgressBar (const char *text, int picture, int show_ok, int auto_close_at_100, int auto_close_half_sec) WASM_IMPORT("showDialogProgressBar") |
| shows a modal progress bar to user | |
| void | setProgressDialogValue (int value_0_to_100) WASM_IMPORT("setProgressDialogValue") |
| sets the value of a progress bar dialog | |
| void | showDialogNumEdit (const char *text, int is_unsigned, int hex_format, int use_min_max, int initial_value, int min, int max) WASM_IMPORT("showDialogNumEdit") |
| shows a number editor to user | |
| void | showDialogNumEditFloat (const char *text, int digits, int use_min_max, float initial_value, int min, int max) WASM_IMPORT("showDialogNumEditFloat") |
| shows a number editor to user | |
| void | showDialogTextEdit (const char *text, const char *initial_value) WASM_IMPORT("showDialogTextEdit") |
| shows a text editor to user | |
| void | showDialogPickList (const char *text, int log) WASM_IMPORT("showDialogPickList") |
| shows a picklist to user | |
| void | setControlProperty (int panel, int control, controlProperty property, int value) WASM_IMPORT("setControlProperty") |
| changes a controls property | |
| void | recordSound (char *file_name, int seconds) WASM_IMPORT("recordSound") |
| records sound from microphone | |
| int | wilEyeTakePicture (int iDestination, const char *sFileName) WASM_IMPORT("wilEyeTakePicture") |
| Take a picture with the WilEye camera. | |
| int | wilEyeStartVideo (int iDestination, const char *sFileName) WASM_IMPORT("wilEyeStartVideo") |
| Start video recording with the WilEye camera. | |
| int | wilEyeStopVideo (void) WASM_IMPORT("wilEyeStopVideo") |
| Stop video recording with the WilEye camera. | |
| int | wilEyeSetZoom (int iZoomLevel) WASM_IMPORT("wilEyeSetZoom") |
| Set the zoom level of the WilEye camera. | |
| int | wilEyeSetContrast (int iContrast) WASM_IMPORT("wilEyeSetContrast") |
| Set the Contrast settings of the WilEye camera. | |
| int | wilEyeSetBrightness (int iBrightness) WASM_IMPORT("wilEyeSetBrightness") |
| Set the Brightness settings of the WilEye camera. | |
| int | wilEyeSetSaturation (int iSaturation) WASM_IMPORT("wilEyeSetSaturation") |
| Set the Saturation settings of the WilEye camera. | |
| int | wilEyeSetHue (int iHue) WASM_IMPORT("wilEyeSetHue") |
| Set the Hue settings of the WilEye camera. | |
| int | wilEyeSetFlash (int iFlashOn) WASM_IMPORT("wilEyeSetFlash") |
| Set the Flash settings of the WilEye camera. | |
| int | wilEyeSetResolution (int iResolution) WASM_IMPORT("wilEyeSetResolution") |
| Set the Resolution settings of the WilEye camera. | |
| int | wilEyeGetEventCount (void) WASM_IMPORT("wilEyeGetEventCount") |
| Get the number of events in the WilEye event queue. | |
| int * | wilEyeGetEvent (int index) WASM_IMPORT("wilEyeGetEvent") |
| Get a WilEye event from the event queue. | |
Free-Wili wasm export header Functions that are exposed from the WASM engine for use in Free-Wili WASM scripts.
| #define FW_GET_EVENT_DATA_MAX 34 |
| #define FWGUI_EVENT_NUMTYPE_FLOAT 3 |
| #define FWGUI_EVENT_NUMTYPE_INT 1 |
| #define FWGUI_EVENT_NUMTYPE_UINT 2 |
| #define WASM_EXPORT extern "C" __attribute__((used)) __attribute__((visibility("default"))) |
| #define WASM_EXPORT_AS | ( | NAME | ) |
| #define WASM_IMPORT | ( | NAME | ) |
| typedef enum _audiowavetype audioWaveType |
| typedef enum _controlProperty controlProperty |
| typedef enum _ePanelColorLED ePanelColorLED |
| typedef enum _ePanelSizeLED ePanelSizeLED |
| typedef enum _FWGuiEventType FWGuiEventType |
| typedef enum _LEDManagerLEDMode LEDManagerLEDMode |
| typedef enum _printOutColor printOutColor |
| typedef enum _printOutDataType printOutDataType |
| typedef enum _WILEyeFileDestination WILEyeFileDestination |
| typedef enum _WILEyeResolution WILEyeResolution |
| typedef enum _WILEyeZoomLevel WILEyeZoomLevel |
| enum _audiowavetype |
| enum _controlProperty |
| enum _ePanelColorLED |
| enum _ePanelSizeLED |
| enum _FWGuiEventType |
| enum _LEDManagerLEDMode |
| enum _printOutColor |
| enum _printOutDataType |
| enum _WILEyeResolution |
| enum _WILEyeZoomLevel |
| void addControlBargraph | ( | int | panel, |
| int | control, | ||
| int | visible, | ||
| int | x, | ||
| int | y, | ||
| int | width, | ||
| int | height, | ||
| int | min, | ||
| int | max, | ||
| int | r, | ||
| int | g, | ||
| int | b ) |
Add a bargraph control to a panel.
| panel | the index of the panel |
| control | the index of the control |
| visible | if the control is shown |
| x | the x position |
| y | the y position |
| width | how wide |
| height | how tall |
| r | the red value. 0-255 |
| g | the green value. 0-255 |
| b | the blue value. 0-255 |
| void addControlButton | ( | int | panel, |
| int | control, | ||
| int | visible, | ||
| int | x, | ||
| int | y, | ||
| int | width, | ||
| int | height, | ||
| int | r, | ||
| int | g, | ||
| int | b, | ||
| int | rFont, | ||
| int | gFont, | ||
| int | bFont, | ||
| const char * | text ) |
Add a button control to a panel.
| panel | the index of the panel |
| control | the index of the control |
| visible | if the control is shown |
| x | the x position |
| y | the y position |
| width | how wide |
| height | how tall |
| r | the red value. 0-255 |
| g | the green value. 0-255 |
| b | the blue value. 0-255 |
| rFont | the red value of text. 0-255 |
| gFont | the green value of text. 0-255 |
| bFont | the blue value of text. 0-255 |
| text | the text to display. |
| void addControlLED | ( | int | index, |
| int | iControlIndex, | ||
| int | iX, | ||
| int | iY, | ||
| ePanelColorLED | iColor, | ||
| ePanelSizeLED | iSize, | ||
| int | iIntialState ) |
| void addControlLogList | ( | int | index, |
| int | iControlIndex, | ||
| int | visible, | ||
| int | iLog, | ||
| int | iX, | ||
| int | iY, | ||
| int | iWidth, | ||
| int | iHeight, | ||
| int | iFontType, | ||
| int | iFontSize, | ||
| int | iR, | ||
| int | iG, | ||
| int | iB, | ||
| int | iRFont, | ||
| int | iGFont, | ||
| int | iBFont, | ||
| int | iListMode ) |
| void addControlNumber | ( | int | panel, |
| int | control, | ||
| int | visible, | ||
| int | x, | ||
| int | y, | ||
| int | width, | ||
| int | fontSize, | ||
| int | fontType, | ||
| int | r, | ||
| int | g, | ||
| int | b, | ||
| int | isFloat, | ||
| int | floatDigits, | ||
| int | isHexFormat, | ||
| int | isUnsigned ) |
Add a number display to a panel.
| panel | the index of the panel. Starts at zero. |
| control | the index of this control. starts at zero |
| visible | if the control should be visible. |
| x | horizontal location of upper left corner of control |
| y | vertical location of the upper left corner of control |
| width | the width of control |
| fontsize | the size of built in font (0-2) |
| fonttype | the type (0=mono, 1=normal) |
| r | background red color of plot (0-255) |
| g | background green color of plot (0-255) |
| b | background blue color of plot (0-255) |
| isfloat | indicates the number should be displayed as float |
| floatDigits | indicates how many digits of past decimal point for float display |
| isHexFormat | applies hex formating to the displayed number |
| isUnsigned | applies unsigned formatting (no minus sign) |
| void addControlPicture | ( | int | panel, |
| int | control, | ||
| int | x, | ||
| int | y, | ||
| int | pictureID, | ||
| int | visible ) |
Add a picture display to a panel from ROM assets.
| panel | the index of the panel. Starts at zero. |
| control | the index of this control. starts at zero |
| x | horizontal location of upper left corner of control |
| y | vertical location of the upper left corner of control |
| pictureID | the assetid for the picture (https://docs.freewili.com/gui-screen-buttons-and-lights/displaying-images/) |
| visible | if the control should be visible. |
| void addControlPictureFromFile | ( | int | panel, |
| int | control, | ||
| int | x, | ||
| int | y, | ||
| const char * | file_name, | ||
| int | visible ) |
add a picture control from a file to a panel
| panel | the index of the panel to add the picture to |
| control | the index of the control |
| x | the x position of the picture |
| y | the y position of the picture |
| file_name | the name of the file to load. expects the file to be in the /images folder |
| visible | if the control should be visible |
| void addControlPlot | ( | int | panel, |
| int | control, | ||
| int | visible, | ||
| int | plotDataBitField, | ||
| int | x, | ||
| int | y, | ||
| int | width, | ||
| int | height, | ||
| int | min, | ||
| int | max, | ||
| int | r, | ||
| int | g, | ||
| int | b ) |
Add a plot to a panel.
| panel | the index of the panel. Starts at zero. |
| control | the index of this control. starts at zero |
| visible | if the control should be visible. |
| plotDataBitField | a bitfield of which logs to plot. bit 0 = log 1, bit 1 = log 2 etc. |
| x | horizontal location of upper left corner of control |
| y | vertical location of the upper left corner of control |
| width | the width of control |
| height | the height of the control |
| min | the vertical axis min value |
| max | the vertical axis max value |
| r | background red color of plot (0-255) |
| g | background green color of plot (0-255) |
| b | background blue color of plot (0-255) |
| void addControlPlotData | ( | int | plotline, |
| int | r, | ||
| int | g, | ||
| int | b ) |
Configures an indivual plot in a plot control.
| plotline | indicates which plot line (0-x) |
| r | red color of the plot line (0-255) |
| g | green color of the plot line (0-255) |
| b | blue color of the plot line (0-255) |
| void addControlPlotXAxis | ( | int | index, |
| int | iControlIndex, | ||
| int | iScrollMode, | ||
| unsigned long long | iTimeMin, | ||
| unsigned long long | iTimeMax ) |
| void addControlText | ( | int | panel, |
| int | control, | ||
| int | x, | ||
| int | y, | ||
| int | fontType, | ||
| int | fontSize, | ||
| int | r, | ||
| int | g, | ||
| int | b, | ||
| const char * | text_value ) |
Add a text control to a panel.
| panel | the index of the panel |
| control | the index of the control |
| x | the x position |
| y | the y position |
| fontType | the font type |
| fontSize | the font size |
| r | the red value. 0-255 |
| g | the green value. 0-255 |
| b | the blue value. 0-255 |
| text | the text to display. |
| void addPanel | ( | int | panel, |
| int | visible, | ||
| int | in_rotation, | ||
| int | use_tile, | ||
| int | tile_id, | ||
| int | bg_red, | ||
| int | bg_green, | ||
| int | bg_blue, | ||
| int | show_menu ) |
Add a new blank panel.
| panel | the index of the panel. Starts at zero. |
| visible | if the panel should be visible. |
| in_rotation | indicates if this panel will be in the next panel rotation |
| use_tile | if the panel should use tiles. |
| tile_id | the graphic asset id of the tile to use. |
| bg_red | the red value of the background color. 0-255 |
| bg_green | the green value of the background color. 0-255 |
| bg_blue | the blue value of the background color. 0-255 |
| show_menu | if the panel should show the button menu. |
| void addPanelPickList | ( | int | panel, |
| const char * | szCaption, | ||
| int | iTileID, | ||
| int | iIconID, | ||
| unsigned char | iRBack, | ||
| unsigned char | iGBack, | ||
| unsigned | iBBack, | ||
| unsigned char | iRFore, | ||
| unsigned char | iGFore, | ||
| unsigned | iBFore, | ||
| int | iLogIndex ) |
a picklist is a type of panel that presents a list for selection
| panel | |
| szCaption | |
| iTileID | |
| iIconID | |
| iRBack | |
| iGBack | |
| iBBack | |
| iRFore | |
| iGFore | |
| iBFore | |
| iLogIndex |
| int canfdTransmit | ( | int | channel, |
| int | id, | ||
| int | isXtd, | ||
| int | isCanfd, | ||
| unsigned char * | data, | ||
| int | length ) |
transmit a can or canfd frame
| channel | the canfd interface index |
| id | the can ID |
| isXtd | indicates the can ID is extened (29 bits) |
| isCanfd | indicates the can frame is a canfd frame instead of can |
| data | pointer to the data to send |
| length | the length of the data to send |
| int changeDirectory | ( | const char * | file_name | ) |
| void clearLogOrPlotData | ( | int | iLogIndexPlusOne, |
| int | iPlotIndexPlusOne ) |
| int closeFile | ( | int | handle | ) |
| void exitToMainAppMenu | ( | void | ) |
exit to the main app menu
| int fileExists | ( | const char * | file_name | ) |
| unsigned int getAllIO | ( | void | ) |
get the state of all GPIO
| int getDirectoryItemByIndex | ( | const char * | directory, |
| const char * | file_name, | ||
| int | include_extension, | ||
| int | index ) |
| int getEventData | ( | unsigned char * | data | ) |
get the data from the event queue
| data | Array to store the event data. Must be at least FW_GET_EVENT_DATA_MAX bytes |
| int getFilePosition | ( | int | handle | ) |
| int getFileSize | ( | int | handle | ) |
| unsigned int getIO | ( | int | io | ) |
get the state of a GPIO
| io | the number of the GPIO |
| void getRTC | ( | void | ) |
| void getVolumeInfo | ( | int * | free, |
| int * | total ) |
| int hasEvent | ( | void | ) |
check if there are events in the queue.
| int i2cRead | ( | int | address, |
| int | reg, | ||
| unsigned char * | data, | ||
| int | length ) |
read from an I2C device
| address | the I2C address |
| reg | the I2C register |
| data | pointer to the data to send |
| length | the length of the data to send |
| int i2cWrite | ( | int | address, |
| int | reg, | ||
| unsigned char * | data, | ||
| int | length ) |
write to an I2C device
| address | the I2C address |
| reg | the I2C register |
| data | pointer to the data to send |
| length | the length of the data to send |
| int loadFPGAFromFile | ( | const char * | file_name | ) |
| int makeDirectory | ( | const char * | file_name | ) |
| unsigned int millis | ( | void | ) |
return number of milliseconds since boot
| int openFile | ( | const char * | file_name, |
| int | mode ) |
| void playSoundFromFile | ( | const char * | file_name | ) |
| file_name |
| void playSoundFromFrequencyAndDuration | ( | float | frequency, |
| float | duration, | ||
| float | amplitude, | ||
| audioWaveType | wavetype ) |
Plays a tone of specified frequency and duration.
| frequency | frequency of the tone to play, in Hz |
| duration | duration of the tone to play, in seconds |
| amplitude | amplitude (1.0 is max, 0.2 recommended) |
| wavetype | WAVETYPE_SINE = 0, |
| void playSoundFromNameOrID | ( | const char * | name, |
| int | id ) |
| name | |
| id |
| void playSoundFromNumber | ( | int | bFloat, |
| int | iNumber, | ||
| float | fNumber, | ||
| int | iFloatDigits ) |
| bFloat | |
| iNumber | |
| fNumber | |
| iFloatDigits |
| void playSoundTextToSpeech | ( | const char * | text | ) |
| text | to be spoken |
| int preAllocateSpaceForFile | ( | int | handle, |
| int | size_in_bytes ) |
| void printFloat | ( | const char * | szFormatSpec, |
| printOutColor | iColor, | ||
| float | fDataItem ) |
| void printInt | ( | const char * | szFormatSpec, |
| printOutColor | iColor, | ||
| printOutDataType | iDataType, | ||
| int | iDataValue ) |
| int PWMSetFreqDuty | ( | int | io, |
| float | freq_hz, | ||
| float | duty ) |
set the frequency and duty cycle of a PWM pin
| io | the number of the PWM pin |
| freq_hz | the frequency of the PWM |
| duty | the duty cycle of the PWM |
| int PWMStop | ( | int | io | ) |
stop PWM on a GPIO pin
| io | the number of the GPIO pin |
| int RadioGetLQI | ( | int | index | ) |
get the LQI of the radio
| index | the index of the radio. 1 for Radio 1, 2 for Radio 2. |
| int RadioGetRSSI | ( | int | index | ) |
get the RSSI of the radio
| index | the index of the radio. 1 for Radio 1, 2 for Radio 2. |
| int RadioGetRxCount | ( | int | index | ) |
get the number of bytes in the radio receive buffer
| index | the index of the radio. 1 for Radio 1, 2 for Radio 2. |
| int RadioLoadConfig | ( | int | index, |
| unsigned char * | data, | ||
| int | length ) |
| int RadioRead | ( | int | index, |
| unsigned char * | data, | ||
| int | length ) |
read data from a radio
| index | the index of the radio. 1 for Radio 1, 2 for Radio 2. |
| data | pointer to the data to send |
| length | the length of the data to send |
| int RadioScan | ( | int | index, |
| int | RssiThreshold, | ||
| unsigned int * | FoundPeak, | ||
| unsigned int * | FrequencyResult, | ||
| int * | RssiResult ) |
Performs a Frequency Scan on supported frequency and reports the frequency that surpassed the Rssi threshold.
| index | the index of the radio. 1 for Radio 1, 2 for Radio 2. |
| RssiThreshold | Threshold on when the frequency should be reported |
| FoundPeak | Flag to indicate a Frequency was found that surpassed RssiThreshold |
| FrequencyResult | Frequency that surpassed RssiThreshold |
| RssiResult | Rssi value match to frequency |
| int RadioSetIdle | ( | int | index | ) |
set the radio to idle
| index | the index of the radio. 1 for Radio 1, 2 for Radio 2. |
| int RadioSetRx | ( | int | index | ) |
set the radio to receive
| index | the index of the radio. 1 for Radio 1, 2 for Radio 2. |
| int RadioSetTx | ( | int | index | ) |
Transmits a sub file to a radio. This function is non-blocking, see RadioSubFileIsTransmitting().
| index | the index of the radio. 1 for Radio 1, 2 for Radio 2. |
| int RadioSubFileIsTransmitting | ( | void | ) |
check if the radio is currently transmitting
| void RadioSubFileStop | ( | void | ) |
Stop a sub-file transmission started with RadioTxSubFile().
| int RadioTxSubFile | ( | int | index, |
| const char * | sub_file ) |
Transmit a sub file to a radio.
| index | the index of the radio. 1 for Radio 1, 2 for Radio 2. |
| sub_file | the name of the sub file to transmit |
| int RadioWrite | ( | int | index, |
| unsigned char * | data, | ||
| int | length ) |
write data to a radio
| index | the index of the radio. 1 for Radio 1, 2 for Radio 2. |
| data | pointer to the data to send |
| length | the length of the data to send |
| int readFile | ( | int | handle, |
| unsigned char * | data, | ||
| int * | data_bytes ) |
| int readFileLine | ( | int | handle, |
| char * | data, | ||
| int * | data_bytes ) |
| void recordSound | ( | char * | file_name, |
| int | seconds ) |
records sound from microphone
| file_name | name of output sound file |
| seconds | how many seconds to record |
| int removeFileOrDirectory | ( | const char * | file_name | ) |
| int renameFileOrDirectory | ( | const char * | name, |
| const char * | new_name ) |
| int runZoomIOScript | ( | const char * | szScript | ) |
| void sendIRData | ( | unsigned int | data | ) |
send IR data
| data | the IR data |
| void setAppLogSettings | ( | int | bLogIRCodes, |
| int | bLogAccel, | ||
| int | bLogTempC, | ||
| int | bLogTempF, | ||
| int | iLogIndex ) |
| void setAudioSettings | ( | int | bStreamMic, |
| int | bStreamFFT, | ||
| int | bEnableMicPlotData, | ||
| int | iMICPlotDataIndex, | ||
| int | bEnableFFTPlotData, | ||
| int | iFFTPlotDataIndex ) |
| void setBoardLED | ( | int | led_index, |
| int | red, | ||
| int | green, | ||
| int | blue, | ||
| int | duration_ms, | ||
| LEDManagerLEDMode | mode ) |
set the state of the tri-color LEDs
| led_index | the index of the LED |
| red | the red value |
| green | the green value |
| blue | the blue value |
| duration_ms | the duration of the LED in milliseconds |
| mode | the mode of the LED. see LEDManagerLEDMode enum for more details. |
| void setCanDisplayReactToButtons | ( | int | CanReactToButtons | ) |
Instructs the display processor to not sink any of the button events first.
| CanReactToButtons | Flag to enable or diable sinking button events on display |
| void setControlProperty | ( | int | panel, |
| int | control, | ||
| controlProperty | property, | ||
| int | value ) |
changes a controls property
| panel | the index of the panel to add the picture to |
| property | the property to change of type controProperty |
| value | the index of the control |
| void setControlValue | ( | int | panel, |
| int | control, | ||
| int | value ) |
Sets a controls value property to an integer value.
| panel | the index of the panel |
| control | the index of the control |
| value | the new value |
| void setControlValueFloat | ( | int | panel, |
| int | control, | ||
| float | value ) |
Sets a controls value property to an float value.
| panel | the index of the panel |
| control | the index of the control |
| value | the new value |
| void setControlValueMinMax | ( | int | panel, |
| int | control, | ||
| int | enable, | ||
| int | min, | ||
| int | max ) |
Add numeric limits to a control.
| panel | the index of the panel |
| control | the index of the control |
| enable | enable the min and max limits |
| min | the minimum value as int |
| max | the maximum value as int |
| void setControlValueMinMaxF | ( | int | panel, |
| int | control, | ||
| int | enable, | ||
| float | min, | ||
| float | max ) |
Add numeric float limits to a control.
| panel | the index of the panel |
| control | the index of the control |
| enable | enable the min and max limits |
| min | the minimum value as float |
| max | the maximum value as int |
| void setControlValueText | ( | int | panel, |
| int | control, | ||
| const char * | text ) |
Sets a controls value property to an float value.
| panel | the index of the panel |
| control | the index of the control |
| the | new text value for the control |
| int setFilePosition | ( | int | handle, |
| int | position ) |
| void setIO | ( | int | io, |
| int | on ) |
set the state of a GPIO
| io | the number of the GPIO |
| on | 1 for on, 0 for off |
| void setLEDShowMode | ( | int | mode | ) |
| void setListItemSelected | ( | int | iLogIndex, |
| int | iListIndex ) |
| void setListItemText | ( | int | iLogIndex, |
| int | iListIndex, | ||
| const char * | szText ) |
| void setListItemTopIndex | ( | int | iLogIndex, |
| int | iListIndex ) |
| void setLogDataText | ( | int | log, |
| const char * | text ) |
Add text to a Log.
| log | the index of the log |
| text | the index of the control |
| void setPanelMenuText | ( | int | panel, |
| int | iButtonGreyFromZero, | ||
| const char * | message ) |
configures text for the bottom screen button menu
| panel | indicates which panel. the addPanel function must enable the menu |
| iButtonGreyFromZero | this indicates the button where menu will appear (starts from left gray = 0) |
| message | a short message to be shown for the button |
| void setPlotData | ( | int | plot, |
| int | settings, | ||
| int | value ) |
Add data to a plot.
| plot | the index of the plot |
| settings | properties of data (ignored for now) |
| value | value to plot |
| void setProgressDialogValue | ( | int | value_0_to_100 | ) |
sets the value of a progress bar dialog
| value_0_to_100 | value to display (100 can trigger auto close) |
| void setSensorSettings | ( | int | bStreamAccel, |
| int | bStreamTemp, | ||
| int | iRateMilliseconds, | ||
| int | bEnableAccelXPlotData, | ||
| int | iAccelXPlotDataIndex, | ||
| int | bEnableAccelYPlotData, | ||
| int | iAccelYPlotDataIndex, | ||
| int | bEnableAccelZPlotData, | ||
| int | iAccelZPlotDataIndex, | ||
| int | bEnableTempPlotDataC, | ||
| int | iTempPlotDataIndexC, | ||
| int | bEnableTempPlotDataF, | ||
| int | iTempPlotDataIndexF ) |
| void showDialogMsgBox | ( | const char * | text, |
| int | show_ok, | ||
| int | show_ok_cancel, | ||
| int | show_none, | ||
| int | picture, | ||
| int | auto_close_half_sec ) |
shows a modal message box to user
| text | text to display |
| show_ok | show an ok button |
| show_ok_cancel | show an ok and cancel button |
| show_none | show no buttons |
| picture | picture rom index of control |
| auto_close_half_sec | if more than zero auto closes after a time period (like toast) |
| void showDialogNumEdit | ( | const char * | text, |
| int | is_unsigned, | ||
| int | hex_format, | ||
| int | use_min_max, | ||
| int | initial_value, | ||
| int | min, | ||
| int | max ) |
shows a number editor to user
| text | text to display |
| is_unsigned | is the number allowed negative |
| hex_format | should this be a hexadecimal number |
| use_min_max | enforce min and max limits |
| initial_value | starting value to edit |
| min | minimum allowed if enabled |
| max | maximum allowed if enabled |
| void showDialogNumEditFloat | ( | const char * | text, |
| int | digits, | ||
| int | use_min_max, | ||
| float | initial_value, | ||
| int | min, | ||
| int | max ) |
shows a number editor to user
| text | text to display |
| digits | is the number allowed negative |
| use_min_max | enforce min and max limits |
| initial_value | starting value to edit |
| min | minimum allowed if enabled |
| max | maximum allowed if enabled |
| void showDialogPickList | ( | const char * | text, |
| int | log ) |
shows a picklist to user
| text | message to display |
| log | log to display |
| void showDialogProgressBar | ( | const char * | text, |
| int | picture, | ||
| int | show_ok, | ||
| int | auto_close_at_100, | ||
| int | auto_close_half_sec ) |
shows a modal progress bar to user
| text | text to display |
| picture | picture rom index of control |
| show_ok | show an ok button |
| auto_close_at_100 | closes dialog when 100 is reached |
| auto_close_half_sec | when at 100 percent - auto closes after a time period (like toast) |
| void showDialogTextEdit | ( | const char * | text, |
| const char * | initial_value ) |
shows a text editor to user
| text | text to display |
| initial_value | starting value to edit |
| void showPanel | ( | int | panel | ) |
Show a panel.
| panel | the index of the panel to show |
| int SPIReadWrite | ( | unsigned char * | data_in, |
| int | length, | ||
| unsigned char * | data_out ) |
read and write data over SPI
| data_in | pointer to the data to send |
| length | the length of the data to send |
| data_out | pointer to the data to receive |
| void terminalWrite | ( | char * | szText | ) |
performs a terminal command as if in the root menu (main only)
| szText | the terminal text |
| int UARTDataRead | ( | unsigned char * | data, |
| int | length ) |
read data from the UART
| data | pointer to the data to read |
| length | the length of the data to read |
| int UARTDataRxCount | ( | void | ) |
Get the number of bytes in the UART receive buffer.
| int UARTDataWrite | ( | unsigned char * | data, |
| int | length ) |
write data to the UART
| data | pointer to the data to write |
| length | the length of the data to write |
| void waitms | ( | int | milliseconds | ) |
wait for a number of milliseconds
| milliseconds | the number of milliseconds to wait |
| int * wilEyeGetEvent | ( | int | index | ) |
Get a WilEye event from the event queue.
| index | the index of the event to get. 0 is the oldest event. |
| int wilEyeGetEventCount | ( | void | ) |
Get the number of events in the WilEye event queue.
| int wilEyeSetBrightness | ( | int | iBrightness | ) |
Set the Brightness settings of the WilEye camera.
| iBrightness | the brightness to set. 0 to 100 |
| int wilEyeSetContrast | ( | int | iContrast | ) |
Set the Contrast settings of the WilEye camera.
| iContrast | the contrast to set. 0 to 100 |
| int wilEyeSetFlash | ( | int | iFlashOn | ) |
Set the Flash settings of the WilEye camera.
| iFlashOn | 1 to turn on the flash, 0 to turn off the flash |
| int wilEyeSetHue | ( | int | iHue | ) |
Set the Hue settings of the WilEye camera.
| iHue | the hue to set. to 100 |
| int wilEyeSetResolution | ( | int | iResolution | ) |
Set the Resolution settings of the WilEye camera.
| iResolution | the resolution to set. See WILEyeResolution enum for more details. |
| int wilEyeSetSaturation | ( | int | iSaturation | ) |
Set the Saturation settings of the WilEye camera.
| iSaturation | the saturation to set. 0 to 100 |
| int wilEyeSetZoom | ( | int | iZoomLevel | ) |
Set the zoom level of the WilEye camera.
| iZoomLevel | the zoom level to set. See WILEyeZoomLevel enum for more details. |
| int wilEyeStartVideo | ( | int | iDestination, |
| const char * | sFileName ) |
Start video recording with the WilEye camera.
| iDestination | the destination to save the video. See WILEyeFileDestination enum for more details. |
| sFileName | the name of the file to save the video to. If saving to the Wili, this is ignored. |
| int wilEyeStopVideo | ( | void | ) |
Stop video recording with the WilEye camera.
| int wilEyeTakePicture | ( | int | iDestination, |
| const char * | sFileName ) |
Take a picture with the WilEye camera.
| iDestination | the destination to save the picture. See WILEyeFileDestination enum for more details. |
| sFileName | the name of the file to save the picture to. If saving to the Wili, this is ignored. |
| int wilirand | ( | void | ) |
return a random postive 32 bit integer
| int writeFile | ( | int | handle, |
| unsigned char * | data, | ||
| int | data_bytes ) |