Skip to content

Commit dbc0784

Browse files
committed
Fix in firmware for non ARM arduinos
* Removed the precision setup if the firmware is not compiled for Due, Zero or MK
1 parent d979cc3 commit dbc0784

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<ui version="4.0" >
2+
<author></author>
3+
<comment></comment>
4+
<exportmacro></exportmacro>
5+
<class>Form</class>
6+
<widget class="QWidget" name="Form" >
7+
<property name="geometry" >
8+
<rect>
9+
<x>0</x>
10+
<y>0</y>
11+
<width>400</width>
12+
<height>300</height>
13+
</rect>
14+
</property>
15+
<property name="windowTitle" >
16+
<string>Form</string>
17+
</property>
18+
</widget>
19+
<pixmapfunction></pixmapfunction>
20+
<connections/>
21+
</ui>

MLC/arduino/Firmware/Firmware.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#define DEBUG 0
22
#include "GenericArduinoController.h"
33

4-
GenericArduinoController controller(SerialUSB);
4+
GenericArduinoController controller(Serial);
55

66
void setup() {
7-
SerialUSB.begin(115200);
8-
7+
//SerialUSB.begin(115200);
8+
9+
Serial.begin(115200);
910
#if DEBUG
1011
Serial.begin(115200);
1112
#endif

MLC/arduino/Firmware/GenericArduinoController.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ int GenericArduinoController::set_analog_precision(GenericArduinoController* thi
135135
int i = byte(data[5]);
136136
// Tal vez conviene separar estas funciones ya que hay boards con resoluciones distintas...
137137
// Igual, así funciona bien con el due (y con todos, ya que no hay problema en superar el máximo de la resolución)
138+
#if defined(ARDUINO_SAM_DUE) || defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000)
138139
analogWriteResolution(i);
139140
analogReadResolution(i);
141+
#endif
140142

141143
LOG("Resolution changed to: ", i);
142144

0 commit comments

Comments
 (0)