Skip to content
Snippets Groups Projects
Commit eb2aeef3 authored by nrs1g15's avatar nrs1g15
Browse files

Added crc8 to comms for error checking

parent 7c005b36
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/sufst-dash.iml" filepath="$PROJECT_DIR$/.idea/sufst-dash.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="CPP_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true">
<generated />
</component>
<component name="CMakeSettings">
<configurations>
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="ChangeListManager">
<list default="true" id="d82c796c-eb6b-44b1-bc58-6a762ff3ba9a" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/../sufst-controller/daq.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../sufst-controller/daq.h" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../sufst-controller/sd.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../sufst-controller/sd.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-can-sd-xbee/sufst-can-sd-xbee.ino" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-controller/dashController.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../sufst-controller/dashController.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-controller/ecuCan.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../sufst-controller/ecuCan.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-controller/ecuOpenloggerTags.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-controller/openLoggerController.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-controller/openLoggerController.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-controller/sufst-controller.ino" beforeDir="false" afterPath="$PROJECT_DIR$/../sufst-controller/sufst-controller.ino" afterDir="false" />
<change beforePath="$PROJECT_DIR$/sufst-dash.ino" beforeDir="false" afterPath="$PROJECT_DIR$/sufst-dash.ino" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/.idea/codeStyles/Project.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/.idea/codeStyles/codeStyleConfig.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/.idea/misc.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/.idea/modules.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/.idea/sufst-openlogger.iml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/.idea/vcs.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/.idea/workspace.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/buffer.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/buffer.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/openLogger.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/openLogger.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger/sufst-openlogger.ino" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/.idea/codeStyles/Project.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/.idea/codeStyles/codeStyleConfig.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/.idea/misc.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/.idea/modules.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/.idea/sufst-openlogger_controller.iml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/.idea/vcs.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/.idea/workspace.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/buffer.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/buffer.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/can.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/can.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/ecuCan.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/ecuCan.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/ecuOpenloggerTags.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/openLoggerController.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/openLoggerController.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-openlogger_controller/sufst-openlogger_controller.ino" beforeDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ClangdSettings">
<option name="formatViaClangd" value="false" />
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/sufst-dash.ino">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="172">
<caret line="271" column="22" selection-start-line="271" selection-start-column="22" selection-end-line="271" selection-end-column="22" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/sufst-dash.ino" />
</list>
</option>
</component>
<component name="ProjectConfigurationFiles">
<option name="files">
<list>
<option value="$PROJECT_DIR$/.idea/sufst-dash.iml" />
<option value="$PROJECT_DIR$/.idea/misc.xml" />
<option value="$PROJECT_DIR$/.idea/vcs.xml" />
<option value="$PROJECT_DIR$/.idea/modules.xml" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="width" value="960" />
<option name="height" value="1030" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="sufst-dash" type="b2602c69:ProjectViewProjectNode" />
<item name="sufst-dash" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.path.for.package.eslint" value="project" />
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="d82c796c-eb6b-44b1-bc58-6a762ff3ba9a" name="Default Changelist" comment="" />
<created>1564151489030</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1564151489030</updated>
<workItem from="1564151490369" duration="1208000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="1208000" />
</component>
<component name="ToolWindowManager">
<frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Favorites" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.118791945" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Database Changes" />
<window_info anchor="bottom" id="Version Control" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Database" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/sufst-dash.ino">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="172">
<caret line="271" column="22" selection-start-line="271" selection-start-column="22" selection-end-line="271" selection-end-column="22" />
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
/*
* Library: libcrc
* File: include/checksum.h
* Author: Lammert Bies
*
* This file is licensed under the MIT License as stated below
*
* Copyright (c) 1999-2016 Lammert Bies
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Description
* -----------
* The headerfile include/checksum.h contains the definitions and prototypes
* for routines that can be used to calculate several kinds of checksums.
*/
#ifndef DEF_LIBCRC_CHECKSUM_H
#define DEF_LIBCRC_CHECKSUM_H
#ifdef __cplusplus
extern "C" {
#endif
#include "Arduino.h"
/*
* #define CRC_START_xxxx
*
* The constants of the form CRC_START_xxxx define the values that are used for
* initialization of a CRC value for common used calculation methods.
*/
#define CRC_START_8 0x00
/*
* Prototype list of global functions
*/
uint8_t crc_8(const unsigned char *input_str, unsigned char num_bytes);
#ifdef __cplusplus
}
#endif
#endif // DEF_LIBCRC_CHECKSUM_H
/*
* Library: libcrc
* File: src/crc8.c
* Author: Lammert Bies
*
* This file is licensed under the MIT License as stated below
*
* Copyright (c) 1999-2016 Lammert Bies
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Description
* -----------
* The source file src/crc8.c contains routines for the calculation of 8 bit
* CRC values according to the calculation rules used in the SHT1x and SHT7x
* series of temperature and humidity sensors.
*/
#include "checksum.h"
/*
* static uint8_t sht75_crc_table[];
*
* The SHT75 humidity sensor is capable of calculating an 8 bit CRC checksum to
* ensure data integrity. The lookup table crc_table[] is used to recalculate
* the CRC.
*/
static uint8_t sht75_crc_table[] = {
0, 49, 98, 83, 196, 245, 166, 151, 185, 136, 219, 234, 125, 76, 31, 46,
67, 114, 33, 16, 135, 182, 229, 212, 250, 203, 152, 169, 62, 15, 92, 109,
134, 183, 228, 213, 66, 115, 32, 17, 63, 14, 93, 108, 251, 202, 153, 168,
197, 244, 167, 150, 1, 48, 99, 82, 124, 77, 30, 47, 184, 137, 218, 235,
61, 12, 95, 110, 249, 200, 155, 170, 132, 181, 230, 215, 64, 113, 34, 19,
126, 79, 28, 45, 186, 139, 216, 233, 199, 246, 165, 148, 3, 50, 97, 80,
187, 138, 217, 232, 127, 78, 29, 44, 2, 51, 96, 81, 198, 247, 164, 149,
248, 201, 154, 171, 60, 13, 94, 111, 65, 112, 35, 18, 133, 180, 231, 214,
122, 75, 24, 41, 190, 143, 220, 237, 195, 242, 161, 144, 7, 54, 101, 84,
57, 8, 91, 106, 253, 204, 159, 174, 128, 177, 226, 211, 68, 117, 38, 23,
252, 205, 158, 175, 56, 9, 90, 107, 69, 116, 39, 22, 129, 176, 227, 210,
191, 142, 221, 236, 123, 74, 25, 40, 6, 55, 100, 85, 194, 243, 160, 145,
71, 118, 37, 20, 131, 178, 225, 208, 254, 207, 156, 173, 58, 11, 88, 105,
4, 53, 102, 87, 192, 241, 162, 147, 189, 140, 223, 238, 121, 72, 27, 42,
193, 240, 163, 146, 5, 52, 103, 86, 120, 73, 26, 43, 188, 141, 222, 239,
130, 179, 224, 209, 70, 119, 36, 21, 59, 10, 89, 104, 255, 206, 157, 172
};
/*
* uint8_t crc_8( const unsigned char *input_str, size_t num_bytes );
*
* The function crc_8() calculates the 8 bit wide CRC of an input string of a
* given length.
*/
uint8_t crc_8(const unsigned char *input_str, unsigned char num_bytes)
{
size_t a;
uint8_t crc;
const unsigned char *ptr;
crc = CRC_START_8;
ptr = input_str;
if (ptr != NULL)
for (a = 0; a < num_bytes; a++) {
crc = sht75_crc_table[(*ptr) ^ crc];
ptr++;
}
return crc;
} /* crc_8 */
/*
* uint8_t update_crc_8( unsigned char crc, unsigned char val );
*
* Given a databyte and the previous value of the CRC value, the function
* update_crc_8() calculates and returns the new actual CRC value of the data
* comming in.
*/
uint8_t update_crc_8(unsigned char crc, unsigned char val)
{
return sht75_crc_table[val ^ crc];
} /* update_crc_8 */
#include "checksum.h"
#define DASH_RPM_LED_RED_1_PIN 2
#define DASH_RPM_LED_RED_2_PIN 4
#define DASH_RPM_LED_GREEN_1_PIN 6
......@@ -28,263 +30,287 @@
#define DASH_RPM_THRESHOLD_SHIFT 13500
#define DASH_WATER_C_THRESHOLD 100
void dashRpmLedsBegin();
void dashRpmLedsProcess();
bool gShiftFlashState = true;
enum DashSerialState {
checkStart = 0,
checkRpm,
checkWaterTemp,
startError
enum DashSerialState
{
checkStart = 0,
checkRpm,
checkWaterTemp,
checkCrc,
startError
};
DashSerialState dashSerialState = checkStart;
uint16_t gDashRpm = 0;
uint16_t gDashWaterTemp = 0;
void setup() {
// put your setup code here, to run once:
void setup()
{
// put your setup code here, to run once:
Serial.begin(57600);
Serial.begin(57600);
dashRpmLedsBegin();
dashWaterLedBegin();
dashRpmLedsBegin();
dashWaterLedBegin();
}
void loop() {
// put your main code here, to run repeatedly:
void loop()
{
// put your main code here, to run repeatedly:
serialProcess();
dashRpmLedsProcess();
dashWaterLedProcess();
serialProcess();
dashRpmLedsProcess();
dashWaterLedProcess();
}
void dashWaterLedBegin()
{
pinMode(DASH_WATER_LED_PIN, OUTPUT);
pinMode(DASH_WATER_LED_PIN, OUTPUT);
digitalWrite(DASH_WATER_LED_PIN, DASH_WATER_LED_NON_ACTIVE);
digitalWrite(DASH_WATER_LED_PIN, DASH_WATER_LED_NON_ACTIVE);
}
void dashRpmLedsBegin()
{
pinMode(DASH_RPM_LED_RED_1_PIN, OUTPUT);
pinMode(DASH_RPM_LED_RED_2_PIN, OUTPUT);
pinMode(DASH_RPM_LED_GREEN_1_PIN, OUTPUT);
pinMode(DASH_RPM_LED_GREEN_2_PIN, OUTPUT);
pinMode(DASH_RPM_LED_GREEN_3_PIN, OUTPUT);
pinMode(DASH_RPM_LED_1_BLUE_PIN, OUTPUT);
pinMode(DASH_RPM_LED_2_BLUE_PIN, OUTPUT);
pinMode(DASH_RPM_LED_3_BLUE_PIN, OUTPUT);
pinMode(DASH_RPM_LED_4_BLUE_PIN, OUTPUT);
pinMode(DASH_RPM_LED_5_BLUE_PIN, OUTPUT);
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
pinMode(DASH_RPM_LED_RED_1_PIN, OUTPUT);
pinMode(DASH_RPM_LED_RED_2_PIN, OUTPUT);
pinMode(DASH_RPM_LED_GREEN_1_PIN, OUTPUT);
pinMode(DASH_RPM_LED_GREEN_2_PIN, OUTPUT);
pinMode(DASH_RPM_LED_GREEN_3_PIN, OUTPUT);
pinMode(DASH_RPM_LED_1_BLUE_PIN, OUTPUT);
pinMode(DASH_RPM_LED_2_BLUE_PIN, OUTPUT);
pinMode(DASH_RPM_LED_3_BLUE_PIN, OUTPUT);
pinMode(DASH_RPM_LED_4_BLUE_PIN, OUTPUT);
pinMode(DASH_RPM_LED_5_BLUE_PIN, OUTPUT);
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
}
void dashRpmLedsThreshold0()
{
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
}
void dashRpmLedsThreshold1()
{
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
}
void dashRpmLedsThreshold2()
{
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
}
void dashRpmLedsThreshold3()
{
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
}
void dashRpmLedsThreshold4()
{
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
}
void dashRpmLedsThreshold5()
{
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
}
void dashRpmLedsThresholdShift()
{
uint32_t currentMs = millis();
uint32_t currentMs = millis();
static uint32_t dashShiftLastFlashMs = 0;
static uint32_t dashShiftLastFlashMs = 0;
if ((currentMs - dashShiftLastFlashMs) >= DASH_RPM_SHIFT_FLASH_SWITCH_MS) {
gShiftFlashState = !gShiftFlashState;
if ((currentMs - dashShiftLastFlashMs) >= DASH_RPM_SHIFT_FLASH_SWITCH_MS) {
gShiftFlashState = !gShiftFlashState;
dashShiftLastFlashMs = millis();
}
dashShiftLastFlashMs = millis();
}
if (gShiftFlashState) {
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_ACTIVE);
}
else {
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
}
if (gShiftFlashState) {
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_ACTIVE);
}
else {
digitalWrite(DASH_RPM_LED_RED_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_RED_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_1_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_2_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_GREEN_3_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_1_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_2_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_3_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_4_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
digitalWrite(DASH_RPM_LED_5_BLUE_PIN, DASH_RPM_LED_NON_ACTIVE);
}
}
void dashRpmLedsProcess()
void dashRpmLedsProcess()
{
if (gDashRpm < DASH_RPM_THRESHOLD_1) {
dashRpmLedsThreshold0();
}
else if (gDashRpm < DASH_RPM_THRESHOLD_2) {
dashRpmLedsThreshold1();
}
else if (gDashRpm < DASH_RPM_THRESHOLD_3) {
dashRpmLedsThreshold2();
}
else if (gDashRpm < DASH_RPM_THRESHOLD_4) {
dashRpmLedsThreshold3();
}
else if (gDashRpm < DASH_RPM_THRESHOLD_5) {
dashRpmLedsThreshold4();
}
else if (gDashRpm < DASH_RPM_THRESHOLD_SHIFT) {
dashRpmLedsThreshold5();
}
else {
dashRpmLedsThresholdShift();
}
if (gDashRpm < DASH_RPM_THRESHOLD_1) {
dashRpmLedsThreshold0();
}
else if (gDashRpm < DASH_RPM_THRESHOLD_2) {
dashRpmLedsThreshold1();
}
else if (gDashRpm < DASH_RPM_THRESHOLD_3) {
dashRpmLedsThreshold2();
}
else if (gDashRpm < DASH_RPM_THRESHOLD_4) {
dashRpmLedsThreshold3();
}
else if (gDashRpm < DASH_RPM_THRESHOLD_5) {
dashRpmLedsThreshold4();
}
else if (gDashRpm < DASH_RPM_THRESHOLD_SHIFT) {
dashRpmLedsThreshold5();
}
else {
dashRpmLedsThresholdShift();
}
}
void dashWaterLedProcess()
{
if (gDashWaterTemp >= DASH_WATER_C_THRESHOLD) {
digitalWrite(DASH_WATER_LED_PIN, DASH_WATER_LED_ACTIVE);
}
else {
digitalWrite(DASH_WATER_LED_PIN, DASH_WATER_LED_NON_ACTIVE);
}
if (gDashWaterTemp >= DASH_WATER_C_THRESHOLD) {
digitalWrite(DASH_WATER_LED_PIN, DASH_WATER_LED_ACTIVE);
}
else {
digitalWrite(DASH_WATER_LED_PIN, DASH_WATER_LED_NON_ACTIVE);
}
}
void serialProcess()
{
while(Serial.available() > 0) {
{
static union
{
struct
{
uint16_t waterTempC;
uint16_t rpm;
};
uint8_t data[4];
} receivedData;
switch (dashSerialState) {
case checkStart: case startError:
if (Serial.read() == DASH_SERIAL_START_BYTE) {
dashSerialState = checkWaterTemp;
}
else {
dashSerialState = startError;
}
while (Serial.available() > 0) {
break;
switch (dashSerialState) {
case checkStart:
case startError:
if (Serial.read() == DASH_SERIAL_START_BYTE) {
dashSerialState = checkWaterTemp;
}
else {
dashSerialState = startError;
}
case checkWaterTemp:
break;
Serial.readBytes((uint8_t *)(&gDashWaterTemp), 2);
case checkWaterTemp:
dashSerialState = checkRpm;
Serial.readBytes((uint8_t * )(&receivedData.waterTempC), 2);
dashSerialState = checkRpm;
break;
break;
case checkRpm:
case checkRpm:
Serial.readBytes((uint8_t *)(&gDashRpm), 2);
dashSerialState = checkStart;
Serial.readBytes((uint8_t * )(&receivedData.rpm), 2);
dashSerialState = checkCrc;
break;
break;
case checkCrc:
if (Serial.read() == crc_8(receivedData.data, 4)) {
gDashWaterTemp = receivedData.waterTempC;
gDashRpm = receivedData.rpm;
}
dashSerialState = checkStart;
break;
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment