Skip to content

Commit 841326d

Browse files
committed
Merge pull request #169 from fallberg/fixes
Renamed illegaly named sketches so they can be built
2 parents c11dd37 + 2116652 commit 841326d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

libraries/MySensors/examples/ParkingSensor/ParkingSensor.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and
6868
MySensor gw;
6969
MyMessage msg(CHILD_ID,V_TRIPPED);
7070
int oldParkedStatus=-1;
71-
int sendInterval = 5000; // Send park status at maximum every 5 second.
71+
unsigned long sendInterval = 5000; // Send park status at maximum every 5 second.
7272
unsigned long lastSend;
7373
#endif
7474

75-
int blinkInterval = 100; // blink interval (milliseconds)
75+
unsigned long blinkInterval = 100; // blink interval (milliseconds)
7676
unsigned long lastBlinkPeriod;
7777
bool blinkColor = true;
7878

7979
// To make a fading motion on the led ring/tape we only move one pixel/distDebounce time
80-
int distDebounce = 30;
80+
unsigned long distDebounce = 30;
8181
unsigned long lastDebouncePeriod;
8282
int numLightPixels=0;
8383
int skipZero=0;
@@ -161,4 +161,4 @@ void loop() {
161161
}
162162
pixels.show(); // This sends the updated pixel color to the hardware.
163163
}
164-
}
164+
}

libraries/MySensors/examples/RGB-3D/RGB-3D.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ void setup()
7878
pinMode(BLUE_PIN, OUTPUT);
7979

8080
// Correct saved RGB value for first start
81-
gw.saveState(RED_PIN, constrain(gw.loadState(RED_PIN), 0, 100));
82-
gw.saveState(GREEN_PIN, constrain(gw.loadState(GREEN_PIN), 0, 100));
83-
gw.saveState(BLUE_PIN, constrain(gw.loadState(BLUE_PIN), 0, 100));
81+
gw.saveState(RED_PIN, constrain((int8_t)gw.loadState(RED_PIN), 0, 100));
82+
gw.saveState(GREEN_PIN, constrain((int8_t)gw.loadState(GREEN_PIN), 0, 100));
83+
gw.saveState(BLUE_PIN, constrain((int8_t)gw.loadState(BLUE_PIN), 0, 100));
8484

8585
// Get value from eeprom and write to output
8686
analogWrite(RED_PIN, 255 * gw.loadState(RED_PIN) / 100);
@@ -105,7 +105,7 @@ void setup()
105105
gw.send( BlueStatus.set(gw.loadState(BLUE_PIN)), false );
106106

107107
// Correct RGB show state for first start and load it (set to 'On' at first start)
108-
gw.saveState(0, constrain(gw.loadState(0), 0, 1));
108+
gw.saveState(0, constrain((int8_t)gw.loadState(0), 0, 1));
109109
isShow=gw.loadState(0);
110110

111111
// Send RGB show state to controler (request ack back: true/false)
@@ -189,7 +189,7 @@ void incomingMessage(const MyMessage &message)
189189
// Save old value to eeprom if it'was not zero
190190
if ( gw.loadState(message.sensor) != 0 )
191191
{
192-
gw.saveState(10*message.sensor, constrain(gw.loadState(message.sensor), 0, 100));
192+
gw.saveState(10*message.sensor, constrain((int8_t)gw.loadState(message.sensor), 0, 100));
193193
}
194194
// Save new value to eeprom
195195
gw.saveState(message.sensor, 0);
@@ -212,7 +212,7 @@ void incomingMessage(const MyMessage &message)
212212
{
213213
uint8_t incomingDimmerStatus = message.getByte();
214214
// limits range of sensor values to between 0 and 100
215-
incomingDimmerStatus = constrain(incomingDimmerStatus, 0, 100);
215+
incomingDimmerStatus = constrain((int8_t)incomingDimmerStatus, 0, 100);
216216
// Change Dimmer level
217217
analogWrite(message.sensor, 255 * incomingDimmerStatus / 100);
218218
//Save value to eeprom

0 commit comments

Comments
 (0)