Great, thank you!
I noticed that your configuration doesn't support pthread, am I right? I built the toolchain myself (on the rpi) and it works, I just changed these two lines in the configuration to also support pthread:
- PTXCONF_CROSS_GCC_THREADS_SINGLE=y - PTXCONF_CROSS_GCC_THREADS="single" --- + PTXCONF_CROSS_GCC_THREADS_POSIX=y + PTXCONF_CROSS_GCC_THREADS="posix"
Last question: do you have any idea why the binaries built with this compiler weight more that the ones built with the buildroot compiler?
For the same program:
ptxbuild compiler: 1.2MB
builtroot compiler: 334KB
g++ main.cpp static-libstdc++ -std=c++11 -pthread -Os -fdata-sections -ffunction-sections, -Wl,--gc-sections)
-sto the compiler command line and see the difference?
SIGALRMthat checks which polls for the back button and calls
_Exit()if it was pressed.
SIGALRMto trigger every second. Having pthreads, just to poll and exit, feels overkill.
I want to use the GyroSensor in both Modes (Angle & Rate) at every time. What is the proper way to do this in c4ev3?
It works with constant shifting:
setAllSensorMode(NO_SEN, NO_SEN,GYRO_ANG,NO_SEN); angle = readSensor(IN_2); setAllSensorMode(NO_SEN, NO_SEN,GYRO_RATE,NO_SEN); rate = readSensor(IN_2);
But that´s not so good for the performance :-(