Skip to content

Commit fe71b2e

Browse files
committed
hide byte enable pin code
1 parent cf504c3 commit fe71b2e

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

RCMv2/RCMv2.ino

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,11 @@ void Enabled()
1919
void Enable()
2020
{
2121
// turn on outputs
22-
23-
// digitalWrite(motorsEnablePin, HIGH); // uncomment if you have an RCMByte board
2422
}
2523

2624
void Disable()
2725
{
28-
// shut off all outputs
29-
30-
// digitalWrite(motorsEnablePin, LOW); // to be safe // uncomment if you have an RCMByte board
26+
// turn off outputs
3127
}
3228

3329
void PowerOn()

RCMv2/rcmutil.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,22 @@ void loop()
110110
}
111111
Always();
112112
if (enabled && !wasEnabled) {
113+
#if RCM_HARDWARE_VERSION == 10
114+
#ifndef RCM_BYTE_DO_NOT_USE_SAFE_DISABLE
115+
digitalWrite(motorsEnablePin, HIGH);
116+
#endif
117+
#endif
118+
113119
Enable();
114120
}
115121
if (!enabled && wasEnabled) {
116122
Disable();
123+
124+
#if RCM_HARDWARE_VERSION == 10
125+
#ifndef RCM_BYTE_DO_NOT_USE_SAFE_DISABLE
126+
digitalWrite(motorsEnablePin, LOW);
127+
#endif
128+
#endif
117129
}
118130
if (enabled) {
119131
Enabled();

0 commit comments

Comments
 (0)