Skip to content

Commit af73e6e

Browse files
committed
TEST_HSV command wasnt blinky enough. Updating FemtoCore commands
1 parent 24c1c80 commit af73e6e

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

libraries/FemtoCore/FemtoCore.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,6 +1867,7 @@ void FemtoCore::processCommand(char* command_chars, byte input_from, byte output
18671867
#endif
18681868

18691869
setRGB(r, g, b, false);
1870+
_reply("SET_RGB:OK", output_to < 1 ? 1: output_to, to_node_id);
18701871
}
18711872
// SET_HSV:0x000:0x00:0x00 where H range is 0x000 to 0x167 (359 dec), S range is 0x00 to 0x64 (100 dec), V range is 0x00 to 0x64 (100 dec)
18721873
else if (command.length() == 23 && command.startsWith("SET_HSV:")) {
@@ -1892,13 +1893,15 @@ void FemtoCore::processCommand(char* command_chars, byte input_from, byte output
18921893
#endif
18931894

18941895
setHSV(h, s, v, false);
1896+
_reply("SET_HSV:OK", output_to < 1 ? 1: output_to, to_node_id);
18951897
}
18961898

18971899
else if (command.startsWith("TEST_RGB")) {
18981900
#ifdef DEBUG
18991901
Serial.print("Testing RGB LED...");
19001902
#endif
19011903
rgbTest();
1904+
_reply("TEST_RGB:OK", output_to < 1 ? 1: output_to, to_node_id);
19021905
#ifdef DEBUG
19031906
Serial.println("OK");
19041907
#endif
@@ -1909,6 +1912,7 @@ void FemtoCore::processCommand(char* command_chars, byte input_from, byte output
19091912
Serial.print("Testing HSV Method...");
19101913
#endif
19111914
hsvTest();
1915+
_reply("TEST_HSV:OK", output_to < 1 ? 1: output_to, to_node_id);
19121916
#ifdef DEBUG
19131917
Serial.println("OK");
19141918
#endif
@@ -1948,6 +1952,7 @@ void FemtoCore::processCommand(char* command_chars, byte input_from, byte output
19481952
rtc.setHours(hour);
19491953
rtc.setMinutes(minutes);
19501954
rtc.setSeconds(seconds);
1955+
_reply("SET_CLOCK:OK", output_to < 1 ? 1: output_to, to_node_id);
19511956
}
19521957
else if (command.startsWith("GET_CLOCK")) {
19531958
char reply_buffer[APP_BUFFER_SIZE];

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
2121

2222
name=Atmel SAM D21/R21 E
23-
version=1.8.0
23+
version=1.8.1
2424

2525
# Compile variables
2626
# -----------------

variants/atsamr21e18a/variant.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,15 @@ const PinDescription g_APinDescription[]=
126126
{ PORTA, 12, PIO_FECTRL, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER_ALT), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // DIG2
127127

128128
{ PORTA, 28, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_15 }//, // USB/VBUS
129-
// { PORTA, 30, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // SWCLK
130-
// { PORTA, 31, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE } // SWDIO
129+
{ PORTA, 30, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // SWCLK
130+
{ PORTA, 31, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE } // SWDIO
131+
132+
/* +------------+------------------+--------+-----------------+--------------------------------------------------------------------------------------------------------
133+
* | Pin number | Antenna | PIN | Label/Name | Comments (* is for default peripheral in use)
134+
* +------------+------------------+--------+-----------------+--------------------------------------------------------------------------------------------------------
135+
* | 24 | | PA15 | | SERCOM2/PAD[3] (TC3/WO[1], peripheral E) (FECTRL[5], peripheral F) (GCLK_IO[1], peripheral H)
136+
* +------------+------------------+--------+-----------------+--------------------------------------------------------------------------------------------------------
137+
*/
131138
} ;
132139

133140
const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ;

0 commit comments

Comments
 (0)