Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SUFST-Arduino-Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SUFST
SUFST-Arduino-Firmware
Commits
195130c1
Commit
195130c1
authored
6 years ago
by
nrs1g15
Browse files
Options
Downloads
Patches
Plain Diff
Formatted file with CLion and added #if RPM_LEDS_ENABLED around all rpm leds stuff
parent
8bcce354
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sufst-can-sd-xbee/sufst-can-sd-xbee.ino
+107
-96
107 additions, 96 deletions
sufst-can-sd-xbee/sufst-can-sd-xbee.ino
with
107 additions
and
96 deletions
sufst-can-sd-xbee/sufst-can-sd-xbee.ino
+
107
−
96
View file @
195130c1
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#define ECU_ATTACHED_ENABLED 1
#define ECU_ATTACHED_ENABLED 1
#define RPM_LEDS_ENABLED
1
#define RPM_LEDS_ENABLED
0
/***************** START OF DEBUG *********************/
/***************** START OF DEBUG *********************/
#define DEBUG_CAN_RX 0
#define DEBUG_CAN_RX 0
...
@@ -116,6 +116,10 @@
...
@@ -116,6 +116,10 @@
#if SD_SERIAL_PRINT_BLOCK_WRITES
#if SD_SERIAL_PRINT_BLOCK_WRITES
#pragma message "SD Serial Printing Block Writes Info Enabled"
#pragma message "SD Serial Printing Block Writes Info Enabled"
#endif //SD_SERIAL_PRINT_BLOCK_WRITES
#endif //SD_SERIAL_PRINT_BLOCK_WRITES
#if RPM_LEDS_ENABLED
#pragma message "RPM LEDs Enabled"
#endif //RPM_LEDS_ENABLED
/***************** END OF COMPLIER NOTICES *********************/
/***************** END OF COMPLIER NOTICES *********************/
/***************** START OF SHAFT SPEED *********************/
/***************** START OF SHAFT SPEED *********************/
...
@@ -135,7 +139,7 @@ volatile float shaftLastCalcFrequency = 0.0;
...
@@ -135,7 +139,7 @@ volatile float shaftLastCalcFrequency = 0.0;
/***************** END OF SHAFT SPEED *********************/
/***************** END OF SHAFT SPEED *********************/
/***************** START OF RPM LEDS **********************/
/***************** START OF RPM LEDS **********************/
#if RPM_LEDS_ENABLE
#if RPM_LEDS_ENABLE
D
#define RPM1_PIN 0
#define RPM1_PIN 0
#define RPM2_PIN 1
#define RPM2_PIN 1
#define RPM3_PIN 2
#define RPM3_PIN 2
...
@@ -152,7 +156,8 @@ volatile float shaftLastCalcFrequency = 0.0;
...
@@ -152,7 +156,8 @@ volatile float shaftLastCalcFrequency = 0.0;
uint16_t
g_RPM
=
0
;
uint16_t
g_RPM
=
0
;
#endif
#endif // RPM_LEDS_ENABLED
/***************** END OF RPM LEDS **********************/
/***************** END OF RPM LEDS **********************/
/***************** START OF SD *********************/
/***************** START OF SD *********************/
#if SD_ENABLED
#if SD_ENABLED
...
@@ -1147,9 +1152,12 @@ canAddTxRequest(0x2006, data, 8);
...
@@ -1147,9 +1152,12 @@ canAddTxRequest(0x2006, data, 8);
}
}
ISR
(
TIMER4_COMPA_vect
)
{
ISR
(
TIMER4_COMPA_vect
)
{
#if RPM_LEDS_ENABLED
if
(
rpmBlueFlashFlag
){
if
(
rpmBlueFlashFlag
){
rpmBlueFlashFlag
=
~
rpmBlueFlashFlag
;
rpmBlueFlashFlag
=
~
rpmBlueFlashFlag
;
}
}
#endif // RPM_LEDS_ENABLED
}
}
ISR
(
TIMER5_COMPA_vect
)
{
ISR
(
TIMER5_COMPA_vect
)
{
...
@@ -1455,6 +1463,7 @@ uint8_t canTransmitRxToXbee()
...
@@ -1455,6 +1463,7 @@ uint8_t canTransmitRxToXbee()
/***************** START OF RPM LED FUNCTIONS *********************/
/***************** START OF RPM LED FUNCTIONS *********************/
/***************** END OF RPM LED FUNCTIONS *********************/
/***************** END OF RPM LED FUNCTIONS *********************/
#if RPM_LEDS_ENABLED
void
rpmBegin
()
{
void
rpmBegin
()
{
pinMode
(
RPM1_PIN
,
OUTPUT
);
pinMode
(
RPM1_PIN
,
OUTPUT
);
...
@@ -1464,6 +1473,7 @@ void rpmBegin(){
...
@@ -1464,6 +1473,7 @@ void rpmBegin(){
pinMode
(
RPM5_PIN
,
OUTPUT
);
pinMode
(
RPM5_PIN
,
OUTPUT
);
timerBegin
(
4
,
4
);
timerBegin
(
4
,
4
);
}
}
void
rpmProcessLEDS
()
{
void
rpmProcessLEDS
()
{
//Use g_RPM to set LED INDICATORS
//Use g_RPM to set LED INDICATORS
//for testing change rpm to tps for testing :)
//for testing change rpm to tps for testing :)
...
@@ -1528,6 +1538,7 @@ void rpmProcessLEDS(){
...
@@ -1528,6 +1538,7 @@ void rpmProcessLEDS(){
}
}
}
}
#endif // RPM_LEDS_ENABLED
/***************** START OF ARDUINO FUNCTIONS *********************/
/***************** START OF ARDUINO FUNCTIONS *********************/
void
setup
()
{
void
setup
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment