mirror of
https://github.com/xodio/xod.git
synced 2026-03-03 07:24:03 +01:00
Merge pull request #2110 from xodio/fix-gpio-no-global-namespace
Fix calling of GPIO functions only from global namespace
This commit is contained in:
@@ -18,10 +18,10 @@ node {
|
||||
#ifdef ESP8266
|
||||
if (transactionTime() - lastReadTime > 4) {
|
||||
lastReadTime = transactionTime();
|
||||
emitValue<output_VAL>(ctx, ::analogRead(constant_input_PORT) / 1023.);
|
||||
emitValue<output_VAL>(ctx, analogRead(constant_input_PORT) / 1023.);
|
||||
}
|
||||
#else
|
||||
emitValue<output_VAL>(ctx, ::analogRead(constant_input_PORT) / 1023.);
|
||||
emitValue<output_VAL>(ctx, analogRead(constant_input_PORT) / 1023.);
|
||||
#endif
|
||||
emitValue<output_DONE>(ctx, 1);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ node {
|
||||
return;
|
||||
|
||||
::pinMode(constant_input_PORT, INPUT_PULLUP);
|
||||
emitValue<output_SIG>(ctx, ::digitalRead(constant_input_PORT));
|
||||
emitValue<output_SIG>(ctx, digitalRead(constant_input_PORT));
|
||||
emitValue<output_DONE>(ctx, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ node {
|
||||
return;
|
||||
|
||||
::pinMode(constant_input_PORT, INPUT);
|
||||
emitValue<output_SIG>(ctx, ::digitalRead(constant_input_PORT));
|
||||
emitValue<output_SIG>(ctx, digitalRead(constant_input_PORT));
|
||||
emitValue<output_DONE>(ctx, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ node {
|
||||
|
||||
::pinMode(constant_input_PORT, OUTPUT);
|
||||
const bool val = getValue<input_SIG>(ctx);
|
||||
::digitalWrite(constant_input_PORT, val);
|
||||
digitalWrite(constant_input_PORT, val);
|
||||
emitValue<output_DONE>(ctx, 1);
|
||||
}
|
||||
}
|
||||
|
||||
6
workspace/big-patch/__fixtures__/arduino.cpp
generated
6
workspace/big-patch/__fixtures__/arduino.cpp
generated
@@ -1999,10 +1999,10 @@ struct Node {
|
||||
#ifdef ESP8266
|
||||
if (transactionTime() - lastReadTime > 4) {
|
||||
lastReadTime = transactionTime();
|
||||
emitValue<output_VAL>(ctx, ::analogRead(constant_input_PORT) / 1023.);
|
||||
emitValue<output_VAL>(ctx, analogRead(constant_input_PORT) / 1023.);
|
||||
}
|
||||
#else
|
||||
emitValue<output_VAL>(ctx, ::analogRead(constant_input_PORT) / 1023.);
|
||||
emitValue<output_VAL>(ctx, analogRead(constant_input_PORT) / 1023.);
|
||||
#endif
|
||||
emitValue<output_DONE>(ctx, 1);
|
||||
}
|
||||
@@ -2126,7 +2126,7 @@ struct Node {
|
||||
return;
|
||||
|
||||
::pinMode(constant_input_PORT, INPUT_PULLUP);
|
||||
emitValue<output_SIG>(ctx, ::digitalRead(constant_input_PORT));
|
||||
emitValue<output_SIG>(ctx, digitalRead(constant_input_PORT));
|
||||
emitValue<output_DONE>(ctx, 1);
|
||||
}
|
||||
|
||||
|
||||
2
workspace/blink/__fixtures__/arduino.cpp
generated
2
workspace/blink/__fixtures__/arduino.cpp
generated
@@ -1449,7 +1449,7 @@ struct Node {
|
||||
|
||||
::pinMode(constant_input_PORT, OUTPUT);
|
||||
const bool val = getValue<input_SIG>(ctx);
|
||||
::digitalWrite(constant_input_PORT, val);
|
||||
digitalWrite(constant_input_PORT, val);
|
||||
emitValue<output_DONE>(ctx, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -1169,7 +1169,7 @@ struct Node {
|
||||
return;
|
||||
|
||||
::pinMode(constant_input_PORT, INPUT);
|
||||
emitValue<output_SIG>(ctx, ::digitalRead(constant_input_PORT));
|
||||
emitValue<output_SIG>(ctx, digitalRead(constant_input_PORT));
|
||||
emitValue<output_DONE>(ctx, 1);
|
||||
}
|
||||
|
||||
@@ -1538,7 +1538,7 @@ struct Node {
|
||||
|
||||
::pinMode(constant_input_PORT, OUTPUT);
|
||||
const bool val = getValue<input_SIG>(ctx);
|
||||
::digitalWrite(constant_input_PORT, val);
|
||||
digitalWrite(constant_input_PORT, val);
|
||||
emitValue<output_DONE>(ctx, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user