mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-31 17:42:55 +08:00
123 lines
4.3 KiB
JSON
123 lines
4.3 KiB
JSON
{
|
|
"actions": [
|
|
],
|
|
"decoder": 1,
|
|
"frameDetection": 1,
|
|
"frameEnd": ";",
|
|
"frameParser": "/**\n * This function parses a binary data frame (represented as a hexadecimal string),\n * and converts it into an array of decimal values ranging from 0 to 5 volts.\n *\n * @param[in] frame The latest received frame as a hexadecimal string.\n * @return Array of integers containing the parsed frame elements.\n */\nfunction parse(frame) {\n let dataArray = [];\n for (let i = 0; i < frame.length; i += 2) {\n let hexByte = frame.substring(i, i + 2);\n let decimalValue = parseInt(hexByte, 16);\n dataArray.push(decimalValue * 5.0 / 255);\n }\n\n return dataArray;\n}",
|
|
"frameStart": "$",
|
|
"groups": [
|
|
{
|
|
"datasets": [
|
|
{
|
|
"alarm": 0,
|
|
"fft": true,
|
|
"fftSamples": 256,
|
|
"fftSamplingRate": 1000,
|
|
"graph": false,
|
|
"index": 1,
|
|
"led": false,
|
|
"ledHigh": 1,
|
|
"log": false,
|
|
"max": 5,
|
|
"min": 0,
|
|
"title": "ADC 0",
|
|
"units": "Volts",
|
|
"value": "--.--",
|
|
"widget": ""
|
|
},
|
|
{
|
|
"alarm": 0,
|
|
"fft": true,
|
|
"fftSamples": 256,
|
|
"fftSamplingRate": 1000,
|
|
"graph": false,
|
|
"index": 2,
|
|
"led": false,
|
|
"ledHigh": 1,
|
|
"log": false,
|
|
"max": 5,
|
|
"min": 0,
|
|
"title": "ADC 1",
|
|
"units": "Volts",
|
|
"value": "--.--",
|
|
"widget": ""
|
|
},
|
|
{
|
|
"alarm": 0,
|
|
"fft": true,
|
|
"fftSamples": 256,
|
|
"fftSamplingRate": 1000,
|
|
"graph": false,
|
|
"index": 3,
|
|
"led": false,
|
|
"ledHigh": 1,
|
|
"log": false,
|
|
"max": 5,
|
|
"min": 0,
|
|
"title": "ADC 2",
|
|
"units": "Volts",
|
|
"value": "--.--",
|
|
"widget": ""
|
|
},
|
|
{
|
|
"alarm": 0,
|
|
"fft": true,
|
|
"fftSamples": 256,
|
|
"fftSamplingRate": 1000,
|
|
"graph": false,
|
|
"index": 4,
|
|
"led": false,
|
|
"ledHigh": 1,
|
|
"log": false,
|
|
"max": 5,
|
|
"min": 0,
|
|
"title": "ADC 3",
|
|
"units": "Volts",
|
|
"value": "--.--",
|
|
"widget": ""
|
|
},
|
|
{
|
|
"alarm": 0,
|
|
"fft": true,
|
|
"fftSamples": 256,
|
|
"fftSamplingRate": 1000,
|
|
"graph": false,
|
|
"index": 5,
|
|
"led": false,
|
|
"ledHigh": 1,
|
|
"log": false,
|
|
"max": 5,
|
|
"min": 0,
|
|
"title": "ADC 4",
|
|
"units": "Volts",
|
|
"value": "--.--",
|
|
"widget": ""
|
|
},
|
|
{
|
|
"alarm": 0,
|
|
"fft": true,
|
|
"fftSamples": 256,
|
|
"fftSamplingRate": 1000,
|
|
"graph": false,
|
|
"index": 6,
|
|
"led": false,
|
|
"ledHigh": 1,
|
|
"log": false,
|
|
"max": 5,
|
|
"min": 0,
|
|
"title": "ADC 5",
|
|
"units": "Volts",
|
|
"value": "--.--",
|
|
"widget": ""
|
|
}
|
|
],
|
|
"title": "ADC Readings",
|
|
"widget": "multiplot"
|
|
}
|
|
],
|
|
"mapTilerApiKey": "",
|
|
"thunderforestApiKey": "",
|
|
"title": "Hexadecimal ADC"
|
|
}
|