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

Added a easy debug mode switch for lower thresholds to use tps as testing input data

parent ccb5da87
No related branches found
No related tags found
No related merge requests found
...@@ -10,47 +10,15 @@ ...@@ -10,47 +10,15 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="d82c796c-eb6b-44b1-bc58-6a762ff3ba9a" name="Default Changelist" comment=""> <list default="true" id="d82c796c-eb6b-44b1-bc58-6a762ff3ba9a" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/../sufst-controller/daq.cpp" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../sufst-controller/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../sufst-controller/.idea/workspace.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../sufst-controller/daq.h" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../sufst-controller/can.h" beforeDir="false" afterPath="$PROJECT_DIR$/../sufst-controller/can.h" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../sufst-controller/sd.cpp" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../sufst-controller/crc8.c" beforeDir="false" afterPath="$PROJECT_DIR$/../sufst-controller/crc8.c" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../sufst-controller/sd.h" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../sufst-controller/daq.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../sufst-controller/daq.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sufst-can-sd-xbee/sufst-can-sd-xbee.ino" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/../sufst-controller/sd.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../sufst-controller/sd.cpp" afterDir="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/sd.h" beforeDir="false" afterPath="$PROJECT_DIR$/../sufst-controller/sd.h" 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-controller/sufst-controller.ino" beforeDir="false" afterPath="$PROJECT_DIR$/../sufst-controller/sufst-controller.ino" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/sufst-dash.ino" beforeDir="false" afterPath="$PROJECT_DIR$/sufst-dash.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> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -66,8 +34,12 @@ ...@@ -66,8 +34,12 @@
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/sufst-dash.ino"> <entry file="file://$PROJECT_DIR$/sufst-dash.ino">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="172"> <state relative-caret-position="493">
<caret line="271" column="22" selection-start-line="271" selection-start-column="22" selection-end-line="271" selection-end-column="22" /> <caret line="47" selection-start-line="47" selection-end-line="47" />
<folding>
<element signature="e#659#889#0" expanded="true" />
<element signature="e#11028#11105#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -84,19 +56,10 @@ ...@@ -84,19 +56,10 @@
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectConfigurationFiles"> <component name="ProjectFrameBounds" extendedState="7">
<option name="files"> <option name="x" value="476" />
<list> <option name="width" value="1453" />
<option value="$PROJECT_DIR$/.idea/sufst-dash.iml" /> <option name="height" value="1038" />
<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>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" /> <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView"> <component name="ProjectView">
...@@ -119,6 +82,7 @@ ...@@ -119,6 +82,7 @@
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" /> <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="node.js.detected.package.eslint" value="true" /> <property name="node.js.detected.package.eslint" value="true" />
...@@ -152,12 +116,12 @@ ...@@ -152,12 +116,12 @@
<option name="number" value="Default" /> <option name="number" value="Default" />
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1564151489030</updated> <updated>1564151489030</updated>
<workItem from="1564151490369" duration="1208000" /> <workItem from="1564151490369" duration="3455000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="1208000" /> <option name="totallyTimeSpent" value="3455000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-7" y="-7" width="1550" height="838" extended-state="6" /> <frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
...@@ -189,8 +153,12 @@ ...@@ -189,8 +153,12 @@
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/sufst-dash.ino"> <entry file="file://$PROJECT_DIR$/sufst-dash.ino">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="172"> <state relative-caret-position="493">
<caret line="271" column="22" selection-start-line="271" selection-start-column="22" selection-end-line="271" selection-end-column="22" /> <caret line="47" selection-start-line="47" selection-end-line="47" />
<folding>
<element signature="e#659#889#0" expanded="true" />
<element signature="e#11028#11105#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
......
#include "checksum.h" #include "checksum.h"
#define DEBUG_DASH 0
#define DASH_RPM_LED_RED_1_PIN 2 #define DASH_RPM_LED_RED_1_PIN 2
#define DASH_RPM_LED_RED_2_PIN 4 #define DASH_RPM_LED_RED_2_PIN 4
#define DASH_RPM_LED_GREEN_1_PIN 6 #define DASH_RPM_LED_GREEN_1_PIN 6
...@@ -22,6 +24,18 @@ ...@@ -22,6 +24,18 @@
#define DASH_SERIAL_START_BYTE 0x55 #define DASH_SERIAL_START_BYTE 0x55
#if DEBUG_DASH
#define DASH_RPM_THRESHOLD_1 30
#define DASH_RPM_THRESHOLD_2 40
#define DASH_RPM_THRESHOLD_3 50
#define DASH_RPM_THRESHOLD_4 60
#define DASH_RPM_THRESHOLD_5 70
#define DASH_RPM_THRESHOLD_SHIFT 80
#define DASH_WATER_C_THRESHOLD 70
#else
#define DASH_RPM_THRESHOLD_1 7000 #define DASH_RPM_THRESHOLD_1 7000
#define DASH_RPM_THRESHOLD_2 9000 #define DASH_RPM_THRESHOLD_2 9000
#define DASH_RPM_THRESHOLD_3 11000 #define DASH_RPM_THRESHOLD_3 11000
...@@ -30,6 +44,7 @@ ...@@ -30,6 +44,7 @@
#define DASH_RPM_THRESHOLD_SHIFT 13500 #define DASH_RPM_THRESHOLD_SHIFT 13500
#define DASH_WATER_C_THRESHOLD 100 #define DASH_WATER_C_THRESHOLD 100
#endif // DEBUG_DASH
void dashRpmLedsBegin(); void dashRpmLedsBegin();
void dashRpmLedsProcess(); void dashRpmLedsProcess();
...@@ -305,7 +320,13 @@ void serialProcess() ...@@ -305,7 +320,13 @@ void serialProcess()
if (Serial.read() == crc_8(receivedData.data, 4)) { if (Serial.read() == crc_8(receivedData.data, 4)) {
gDashWaterTemp = receivedData.waterTempC; gDashWaterTemp = receivedData.waterTempC;
gDashRpm = receivedData.rpm; gDashRpm = receivedData.rpm;
#if DEBUG_DASH
Serial.println(gDashRpm);
Serial.println(gDashWaterTemp);
#endif // DEBUG_DASH
} }
dashSerialState = checkStart; dashSerialState = checkStart;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment