In the Cygwin environment the native Windows serial COM# ports get mapped
to /dev/ttyS# for POSIX compatibility. While # is one number lower inside
the environment than the COM port number because it's 0 indexed instead
of 1.
I added the necessary handling to all the dependent parts I found which
allows uploading to /dev/ttyS# when the cygwin platform is detected.
Now the usual "make px4fmu-v4 upload" and
"./Tools/upload.sh build/px4fmu-v4_default/px4fmu-v4_default.px4" work.
compiler warning:
../../src/systemcmds/tests/test_mixer.cpp: In member function ‘bool MixerTest::loadAllTest()’:
../../src/systemcmds/tests/test_mixer.cpp:202:18: error: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 1 byte from a string of the same length [-Werror=stringop-truncation]
(void)strncpy(&buf[strlen(MIXER_ONBOARD_PATH)], "/", 1);
Thanks to @bkueang 's review comment I switched to an explicit check for
an empty sting instead of a condition that could be theoretically true
in other cases and is less readable.
Type "man test" on your terminal to read up what -n stands for.
It seems that on linux only inside a makefile the parameter after the echo
command gets printed if no single quoted sting comes afterwards so I had
to switch to single quotes such that I can use the parameter.
Force interpretation of backslash escapes with the parameter -e of echo.
Switch to a lighter blue because on certain terminals default blue is
hard to read on black background.
The shell script which checks the style relies on greping for the
keyword "Formatted" in the output of astyle. But the program has
localization support and will output in other languages e.g. german.
This leads to all style checks always succeeding. I only tested this
on Windows in Cygwin but I can imagine the problem also exists in
non-english Ubuntu installations.
Solution is the parameter --formatted of astyle which only produces
any output if there was something to fix. This allows for a display
language independent condition for an empty string inside the shell
script.
When determining the confidence of a barometer sensor, we should
consider the temperature as well, alongside the pressure.
Low-noise baros can show the same pressure reading for a second
or two when not moving and in an indoor location.