I am designing an app, where one function is to read out some strings, which are sent from an Arduino.
So basically, the Arduino will send something like
over serial. DS is the "stopper" string, so if DS is sent, the app shall stop reading over Serial.
Now, whats frustrating me, is following: My code to read out these strings is
received_stringM = fgets(app.s);
if received_stringM == "DS"
app.currentdistanceEditField_2.Value = received_stringM;
This is the Edit Field, where the string is displayed to.
But exactly this is wondering me. The code is very simple, but I thought after the break command, the following lines shouldn't be executed. But obviously, even though DS is sent, it doesn't break, but is displayed.
Does anyone see any mistake in my code?
Thanks for reading and for any advices!