mstrens / oXs_on_RP2040

version of openXsensor to be used on raspberry pi pico RP2040 (more protocols, more functionalities)
86 stars 22 forks source link

Sequencer functions oXs RP2040 #108

Closed Satcomix closed 11 months ago

Satcomix commented 11 months ago

Hello Mstrens, I have read the instructions several times now, but I have some questions about how the sequencer works. e.g. SEQ={3 0 100 15 -100 -100 +90} 1.Which PWM signal 1000us to 2000us triggers the sequence on GPio 15 to control a servo on channel 3.

  1. 100ms clock for what? An analog servo is normally controlled at 50Hz 20ms, digital at 333Hz. 3.PWM = -100 (default), -100 (min) and 90(max) what are these values ​​for? Does the first -100(default) mean that the function is triggered at 1000us? I have already described in the RCG how I would like to trigger the sequences. With my FrSky X20S and the touch display which is controlled by a LUA script. This script creates 24 different PWM values on one RC channel, which are only generated once for 50ms to 150ms(normally, but i can set the time) when a button is pressed. best regards, Torsten
Satcomix commented 10 months ago

An error occurs when you switch from version 2.8.0-main to e.g. 2.8.40-test. You have to NUKE the Main-Version, before you can copy and work with the 2.8.36 or 2.8.40

No sequencers are defined Error in parameters: When gpio is defined for ESC, gpio for Volt1 (V1) must be undefined (=255) Error in parameters: When gpio is defined for ESC, gpio for current = Volt2 (V2) must be undefined (=255) Error in parameters: When gpio is defined for ESC, gpio for RPM must be undefined (=255) Error in parameters: When gpio is defined for ESC, esc type must be HW4 or KON Error in parameters: pwmHz must be in range 50...333 (included)

Attention: error in config parameters Press ? + Enter to get help about the commands

Satcomix commented 10 months ago

I made a new build with Version 2.8.40-test, renamed it in version 2.8.99 and define/activate the camera stabilizer values for pitch and roll. Without GPS UART everything worked, telemetry values, SBUS, sequencer, pitch and roll for camera servos, failsafe and also the Logger 0.0.15

Rebooted by Watchdog!

Config parameters are OK Press ? + Enter to get help about the commands Trying to detect MS5611 sensor at I2C Addr=77 MS5611 sensor is successfully detected ADS1115 sensor I2C Addr=48 Set up Ads1115 done and OK. ADS1115 sensor I2C Addr=49 Set up Ads1115 done and OK. Trying to detect MPU6050 sensor at I2C Addr=68 Setup1 takes 13894 usec

Version = 2.8.99 Function GPIO Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 255 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 255 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 255 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 6 7 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 10 11 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29) RGB led . . . . . . . . . = 16 (RGB = 0, 1, 2, ..., 29) Logger . . . . . . . . . = 0 (LOG = 0, 1, 2, ..., 29) ESC . . . . . . . . . . . = 255 (ESC_PIN= 0, 1, 2, ..., 29)

Esc type is not defined

Protocol is Fbus(Frsky) CRSF baudrate = 420000 Logger baudrate = 115200 PWM is generated at = 50 Hz

Voltage parameters: Scales : 1.000000 , 1.000000 , 1.000000 , 1.000000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 No temperature sensors are connected on V3 and V4 RPM multiplier = 1.000000 Baro sensor is detected using MS5611 Sensitivity min = 100 (at 100) , max = 300 (at 1000) Hysteresis = 5 Acc/Gyro is detected using MP6050 Acceleration offsets X, Y, Z = 175 , -64 , -2820 Gyro offsets X, Y, Z = 23 , -165 , -193 Aispeed sensor is detected using MS4525 Vspeed compensation channel = 7 First analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 5 , 5 , 5 ,5 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Second analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 5 , 5 , 5 ,5 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Foreseen GPS type is Ublox (configured by oXs) :GPS is not (yet) detected Led color is normal (not inverted) Failsafe uses predefined values Chan 1...4 = 1500 1500 1500 1500 Chan 5...8 = 2012 2012 1500 1500 Chan 9...12 = 1500 1500 1500 1500 Chan 13...16= 1500 1500 1500 1500

Number of: sequencers=2 sequences=4 steps= 4 Sequencer = [ Gpio Type(0=servo,1=analog) Clock(msec) ChannelNr Default Min Max ] Sequence = ( RC_value(-100...100) to_Repeat Uninterrupted Only_priority_interrupted is_a_Priority_seq ) Step = { Smooth(clocks) Pwm(-100...100) Keep(clocks) } SEQ= [ 8 0 20 3 100 -100 100 ] ( 50 O ) {0 100 255} ( 100 P ) {0 -100 255} [ 9 0 20 3 100 -100 100 ] ( 40 O ) {0 100 255} ( 90 P ) {0 -100 255}

Config parameters are OK Press ? + Enter to get help about the commands processing cmd

Cmd to execute: FV

Volt 1 = 1780 mVolt Current (Volt 2) = 1661 mA Volt 3 = 243 mVolt Volt 4 = 352 mVolt Capacity (using current) = 11 mAh Vspeed = 0 cm/s Baro Rel altitude = 0 cm Pitch = 0.040000 degree Roll = 0.020000 degree RPM = 997 Hertz Ads 1 1 = 119 mVolt Ads 1 2 = 119 mVolt Ads 1 3 = 119 mVolt Ads 1 4 = 119 mVolt Ads 2 1 = 119 mVolt Ads 2 2 = 119 mVolt Ads 2 3 = 119 mVolt Ads 2 4 = 119 mVolt Airspeed = 36 cm/s Compensated Vspeed = 27 cm/s Acc X = 0.000000g Acc Y = 0.000000g Acc Z = 0.999000g Vspeed compensation = 1.10 pwmTop= 20000

mstrens commented 10 months ago

An error occurs when you switch from version 2.8.0-main to e.g. 2.8.40-test. You have to NUKE the Main-Version, before you can copy and work with the 2.8.36 or 2.8.40

No sequencers are defined Error in parameters: When gpio is defined for ESC, gpio for Volt1 (V1) must be undefined (=255) Error in parameters: When gpio is defined for ESC, gpio for current = Volt2 (V2) must be undefined (=255) Error in parameters: When gpio is defined for ESC, gpio for RPM must be undefined (=255) Error in parameters: When gpio is defined for ESC, esc type must be HW4 or KON Error in parameters: pwmHz must be in range 50...333 (included)

Attention: error in config parameters Press ? + Enter to get help about the commands

This is not a bug (if ESC pin is defined. When ESC is used, I suppose that Volt, Current and RPM are provided by the ESC. So it is normal that you have to disable VOLT1, VOLT2 and RPM pins. Then oXs should say that config is not valid and so do nothing except handling USB commands (to let you fix the errors - disabling ESC pin or the others pins if ESC is really used)

Satcomix commented 10 months ago

I never activated ESC=0, it was the config in version 2.8.8. But if I now install a newer version with ESC=255, the board does not accept this setting. Also when you set the command ESC=255 the baord does not accept the command!!!

mstrens commented 10 months ago

ESC=0 was the result of an old bug (where unused flash was filled with 0 instead of 255)

If oXs does not accept ESC command anymore.. Now it is ESC_PIN and ESC_TYPE. When I added TYPE, I rename ESC

mstrens commented 10 months ago

I do not see immediately the bug about GPS. 2.8.1 is indeed the changes I made to let oXs uses the same PIO/SM for GPS TX and RX. So I expect that the bug is in the new gps code. I understood that your device reboot when GPS is activated. I just tested with latest test version 2.9.6 and the GPS activated. Still I had no physical GPS, no sensor, no Rx connected. I do not have automatic reboot. So I suspect that the issue occurs when some data are really provided by the GPS or the receiver or some sensors. Could you try with the same config parameter as me (see below) and no GPS/RX/sensors connected. If this works, then could you step by step connect physically the GPS, the Rx. If this still works, then change the config to activate one by one the other functions (I2C, logger, sequencer, RPM) to see from which point the issue occurs. Here is my config used for my test. Function GPIO Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 255 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 0 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 1 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 255 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 29 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 255 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 255 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 255 255 255 255 (V1 / V4 = 26, 27, 28, 29) RGB led . . . . . . . . . = 16 (RGB = 0, 1, 2, ..., 29) Logger . . . . . . . . . = 255 (LOG = 0, 1, 2, ..., 29) ESC . . . . . . . . . . . = 255 (ESC_PIN= 0, 1, 2, ..., 29)

Esc type is not defined

Protocol is Sport (Frsky) CRSF baudrate = 420000 Logger baudrate = 115200 PWM is generated at = 50 Hz

Voltage parameters: Scales : 1.000000 , 1.000000 , 1.000000 , 1.000000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 No temperature sensors are connected on V3 and V4 RPM multiplier = 1.000000 Baro sensor is not detected Acc/Gyro is not detected Airspeed sensor is not detected No Vspeed compensation channel defined; oXs uses default settings First analog to digital sensor is not detected Second analog to digital sensor is not detected Foreseen GPS type is Ublox (configured by oXs) :GPS is not (yet) detected Led color is normal (not inverted) Failsafe type is HOLD

No sequencers are defined

Config parameters are OK Press ? + Enter to get help about the commands Gyro configuration is: Channels for : gyro control=10 , Ail stick=11 , Elv stick=12 , Rud stick=13 PID Kp Ki Kd Normal Roll 500 0 500
Normal Pitch 500 0 500
Normal Yaw 500 0 500
Hold Roll 500 500 500
Hold Pitch 500 500 500
Hold Yaw 500 500 500
Gain per axis (-128/127): Roll=127 Pitch=127 Yaw=127 Gyro corections on 1 (1=on whole stick, 2=on half, 3=on a quater)

Gyro mixers are calibrated: Gyro corrections (%) on: Channel 1 center=19 rollRight=-79 rollLeft=58 pitchUp0 pitchDown=0 yawRight=0 yawLeft=0 min=-79 max=78

Satcomix commented 10 months ago

Hello Mstrens, I'll start the tests right away, I currently only have the X20S and an RP2040 board without sensors available. I will do all other tests with sensors and GPS tomorrow. Thanks for your new version. Greetings, Torsten

mstrens commented 10 months ago

FYI, new version contains only changes for gyro. So, it should not solve the bug you found about GPS. It is just easier for me to make changes into latest version. So if I have to add debug messages based on your tests, I will do it in latest version.

Satcomix commented 10 months ago

Hello Mstrens, I just did the first test with version 2.9.6. with X20S FBUS protocol I also adopted exactly the settings from you, but that doesn't make any difference in the result which GPio ports you use. The moment you enter GPS_RX=X the green LED changes to red and stays there, no reboot takes place, but there are no telemetry data send to handset. When you enter GPS_TX= then the red LED gets green again. When you enter GPS_RX=255 the red LED become green again. When you enter RPM=X or 255 the LED stay green. You can enter LOG=0 or LOG=255 the LED stay everytime green.

processing cmd

Version = 2.9.6 Function GPIO Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 255 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 255 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 255 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29) RGB led . . . . . . . . . = 18 (RGB = 0, 1, 2, ..., 29) Logger . . . . . . . . . = 0 (LOG = 0, 1, 2, ..., 29) ESC . . . . . . . . . . . = 255 (ESC_PIN= 0, 1, 2, ..., 29)

Esc type is not defined

Protocol is Fbus(Frsky) CRSF baudrate = 420000 Logger baudrate = 115200 PWM is generated at = 50 Hz

Voltage parameters: Scales : 1.000000 , 1.000000 , 0.100000 , 1.000000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 One temperature sensor is connected on V3 RPM multiplier = 1.000000 Baro sensor is not detected Acc/Gyro is not detected Airspeed sensor is not detected No Vspeed compensation channel defined; oXs uses default settings First analog to digital sensor is not detected Second analog to digital sensor is not detected Foreseen GPS type is Ublox (configured by oXs) :GPS is not (yet) detected Led color is normal (not inverted) Failsafe type is HOLD

No sequencers are defined

Config parameters are OK Press ? + Enter to get help about the commands Gyro configuration is: Channels for : gyro control=10 , Ail stick=11 , Elv stick=12 , Rud stick=13 PID Kp Ki Kd Normal Roll 500 0 500
Normal Pitch 500 0 500
Normal Yaw 500 0 500
Hold Roll 500 500 500
Hold Pitch 500 500 500
Hold Yaw 500 500 500
Gain per axis (-128/127): Roll=127 Pitch=127 Yaw=127 Gyro corections on 1 (1=on whole stick, 2=on half, 3=on a quater)

Gyro mixers are calibrated: Gyro corrections (from center pos in %) on:
Channel 1 center=19 rollRight=-79 rollLeft=58 pitchUp0 pitchDown=0 yawRight=0 yawLeft=0 min=-79 max=78

Satcomix commented 10 months ago

Board is connected to RX with FBUS, but without any I2C Sensor or GPS All features activate, and no reboot and no red LED. Tomorow i will make the next tests with I2C sensors and GPS connected

processing cmd

Version = 2.9.6 Function GPIO Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 255 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 12 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 13 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29) RGB led . . . . . . . . . = 18 (RGB = 0, 1, 2, ..., 29) Logger . . . . . . . . . = 0 (LOG = 0, 1, 2, ..., 29) ESC . . . . . . . . . . . = 255 (ESC_PIN= 0, 1, 2, ..., 29)

Esc type is not defined

Protocol is Fbus(Frsky) CRSF baudrate = 420000 Logger baudrate = 115200 PWM is generated at = 50 Hz

Voltage parameters: Scales : 1.000000 , 1.000000 , 0.100000 , 1.000000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 One temperature sensor is connected on V3 RPM multiplier = 1.000000 Baro sensor is not detected Acc/Gyro is not detected Airspeed sensor is not detected No Vspeed compensation channel defined; oXs uses default settings First analog to digital sensor is not detected Second analog to digital sensor is not detected Foreseen GPS type is Ublox (configured by oXs) :GPS is not (yet) detected Led color is normal (not inverted) Failsafe type is HOLD

No sequencers are defined

Config parameters are OK Press ? + Enter to get help about the commands Gyro configuration is: Channels for : gyro control=10 , Ail stick=11 , Elv stick=12 , Rud stick=13 PID Kp Ki Kd Normal Roll 500 0 500
Normal Pitch 500 0 500
Normal Yaw 500 0 500
Hold Roll 500 500 500
Hold Pitch 500 500 500
Hold Yaw 500 500 500
Gain per axis (-128/127): Roll=127 Pitch=127 Yaw=127 Gyro corections on 1 (1=on whole stick, 2=on half, 3=on a quater)

Gyro mixers are calibrated: Gyro corrections (from center pos in %) on:
Channel 1 center=19 rollRight=-79 rollLeft=58 pitchUp0 pitchDown=0 yawRight=0 yawLeft=0 min=-79 max=78

mstrens commented 10 months ago

Both GPS_TX and GPS_RX must be defined simultaneously or not. When you have both == 255, then config is OK When you first change TX (or RX), the config is not valid anymore and oXs stop all process except handling the USB commands. When you enter RX (ot TX) the config becomes valid again and process can start again.

So I expect what you noticed is normal. Do not forget to look is config is valid or not when you make changes. The status is given when you press Enter command.

Satcomix commented 10 months ago

Hello Mstrens, More tests: I know that the LED colours from the last tests are normal. Here is my own build from version 2.9.6 ( Version 2.9.9) When assigned GPS_RX=12 LED=red, ok so far GPS_TX=13 Constantly rebooting after about 10 seconds, with or without connected GPS BE250 M10

FrSky X20S TD-R10 receiver FBUS protocol All possible values activated without GPS, and camera stabilizer on CH5,6 and CH15,16 active, and works.

processing cmd

Version = 2.9.9 Function GPIO Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 255 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 255 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 255 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 8 9 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 10 11 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29) RGB led . . . . . . . . . = 18 (RGB = 0, 1, 2, ..., 29) Logger . . . . . . . . . = 0 (LOG = 0, 1, 2, ..., 29) ESC . . . . . . . . . . . = 255 (ESC_PIN= 0, 1, 2, ..., 29)

Esc type is not defined

Protocol is Fbus(Frsky) CRSF baudrate = 420000 Logger baudrate = 115200 PWM is generated at = 50 Hz

Voltage parameters: Scales : 1.000000 , 1.000000 , 0.100000 , 1.000000 Offsets: 0.000000 , 0.000000 , 2.000000 , 0.000000 One temperature sensor is connected on V3 RPM multiplier = 1.000000 Baro sensor is detected using MS5611 Sensitivity min = 100 (at 100) , max = 300 (at 1000) Hysteresis = 5 Acc/Gyro is detected using MP6050 Acceleration offsets X, Y, Z = 668 , -75 , -2852 Gyro offsets X, Y, Z = 31 , -168 , -195 Aispeed sensor is detected using MS4525 Vspeed compensation channel = 7 First analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 5 , 5 , 5 ,5 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Second analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 5 , 5 , 5 ,5 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Foreseen GPS type is Ublox (configured by oXs) :GPS is not (yet) detected Led color is normal (not inverted) Failsafe uses predefined values Chan 1...4 = 1500 1500 1500 1500 Chan 5...8 = 1500 1500 1500 1500 Chan 9...12 = 1500 1500 1500 1500 Chan 13...16= 1500 1500 1500 1500

Number of: sequencers=2 sequences=4 steps= 4 Sequencer = [ Gpio Type(0=servo,1=analog) Clock(msec) ChannelNr Default Min Max ] Sequence = ( RC_value(-100...100) to_Repeat Uninterrupted Only_priority_interrupted is_a_Priority_seq ) Step = { Smooth(clocks) Pwm(-100...100) Keep(clocks) } SEQ= [ 6 0 20 3 -100 -100 100 ] ( 50 O ) {0 -100 255} ( 100 P ) {0 100 255} [ 7 0 20 3 -100 -100 100 ] ( 40 O ) {0 -100 255} ( 90 P ) {0 100 255}

Config parameters are OK Press ? + Enter to get help about the commands

Satcomix commented 10 months ago

Original version 2.9.8 Camera stabilizer don`t work anymore. No reboot this time!**** processing cmd

Version = 2.9.8 Function GPIO Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 255 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 12 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 13 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 8 9 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 10 11 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29) RGB led . . . . . . . . . = 18 (RGB = 0, 1, 2, ..., 29) Logger . . . . . . . . . = 0 (LOG = 0, 1, 2, ..., 29) ESC . . . . . . . . . . . = 255 (ESC_PIN= 0, 1, 2, ..., 29)

Esc type is not defined

Protocol is Fbus(Frsky) CRSF baudrate = 420000 Logger baudrate = 115200 PWM is generated at = 50 Hz

Voltage parameters: Scales : 1.000000 , 1.000000 , 0.100000 , 1.000000 Offsets: 0.000000 , 0.000000 , 2.000000 , 0.000000 One temperature sensor is connected on V3 RPM multiplier = 1.000000 Baro sensor is detected using MS5611 Sensitivity min = 100 (at 100) , max = 300 (at 1000) Hysteresis = 5 Acc/Gyro is detected using MP6050 Acceleration offsets X, Y, Z = 668 , -75 , -2852 Gyro offsets X, Y, Z = 31 , -168 , -195 Aispeed sensor is detected using MS4525 Vspeed compensation channel = 7 First analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 5 , 5 , 5 ,5 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Second analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 5 , 5 , 5 ,5 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Foreseen GPS type is Ublox (configured by oXs) :GPS is detected and has a fix Led color is normal (not inverted) Failsafe uses predefined values Chan 1...4 = 1500 1500 1500 1500 Chan 5...8 = 1500 1500 1500 1500 Chan 9...12 = 1500 1500 1500 1500 Chan 13...16= 1500 1500 1500 1500

Number of: sequencers=2 sequences=4 steps= 4 Sequencer = [ Gpio Type(0=servo,1=analog) Clock(msec) ChannelNr Default Min Max ] Sequence = ( RC_value(-100...100) to_Repeat Uninterrupted Only_priority_interrupted is_a_Priority_seq ) Step = { Smooth(clocks) Pwm(-100...100) Keep(clocks) } SEQ= [ 6 0 20 3 -100 -100 100 ] ( 50 O ) {0 -100 255} ( 100 P ) {0 100 255} [ 7 0 20 3 -100 -100 100 ] ( 40 O ) {0 -100 255} ( 90 P ) {0 100 255}

Config parameters are OK Press ? + Enter to get help about the commands Gyro configuration is: Channels for : gyro control=9 , Ail stick=10 , Elv stick=11 , Rud stick=12 PID Kp Ki Kd Normal Roll 500 0 500
Normal Pitch 500 0 500
Normal Yaw 500 0 500
Hold Roll 500 500 500
Hold Pitch 500 500 500
Hold Yaw 500 500 500
Gain per axis (-128/127): Roll=127 Pitch=127 Yaw=127 Gyro corections on 1 (1=on whole stick, 2=on half, 3=on a quater)

Gyro mixers are calibrated: Gyro corrections (from center pos in %) on:
Channel 1 center=19 rollRight=-79 rollLeft=58 pitchUp0 pitchDown=0 yawRight=0 yawLeft=0 min=-79 max=78

Satcomix commented 10 months ago

Hello Mstrens, After I created a new build with version 2.9.8, I get a reboot every 10 seconds again. The LED flashes green until reboot. When I use the original version everything works normally, with activated GPS. When i deactivate GPS_RX=255, no more REBOOT, LED red=ok When i deactivate GPS_TX=255 LED green no REBOOT With or without connected GPS

mstrens commented 10 months ago

You say "When I use the original version everything works normally, with activated GPS." I presume you mean 2.8.0 version.

So the issue is related to GPS but probably when there are some other functions used. With a version that does not work (so GPS + some other functions activated), can you try do deactivate one by one each function (except GPS) . I suggest to start deactivating logger, then also RPM, then also I2C. I hope that so, you can quite quickly find the combination that creates the issue.

Satcomix commented 10 months ago

No i made the tests with your original 2.9.8-test. ;-(( I don`t know why it works with 2.9.8. I'm slowly no longer looking through all the versions to see which tests, with which settings, how work and which don't.

Satcomix commented 10 months ago

Everything (without camera stabilizer) works, in version 2.9.8 with connected Logger 0.0.15, i don`t know why???

processing cmd

Version = 2.9.8 Function GPIO Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 255 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 12 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 13 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 8 9 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 10 11 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29) RGB led . . . . . . . . . = 18 (RGB = 0, 1, 2, ..., 29) Logger . . . . . . . . . = 0 (LOG = 0, 1, 2, ..., 29) ESC . . . . . . . . . . . = 255 (ESC_PIN= 0, 1, 2, ..., 29)

Esc type is not defined

Protocol is Fbus(Frsky) CRSF baudrate = 420000 Logger baudrate = 115200 PWM is generated at = 50 Hz

Voltage parameters: Scales : 1.000000 , 1.000000 , 0.100000 , 1.000000 Offsets: 0.000000 , 0.000000 , 2.000000 , 0.000000 One temperature sensor is connected on V3 RPM multiplier = 1.000000 Baro sensor is detected using MS5611 Sensitivity min = 100 (at 100) , max = 300 (at 1000) Hysteresis = 5 Acc/Gyro is detected using MP6050 Acceleration offsets X, Y, Z = 668 , -75 , -2852 Gyro offsets X, Y, Z = 31 , -168 , -195 Aispeed sensor is detected using MS4525 Vspeed compensation channel = 7 First analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 5 , 5 , 5 ,5 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Second analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 5 , 5 , 5 ,5 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Foreseen GPS type is Ublox (configured by oXs) :GPS is not (yet) detected Led color is normal (not inverted) Failsafe uses predefined values Chan 1...4 = 1500 1500 1500 1500 Chan 5...8 = 1500 1500 1500 1500 Chan 9...12 = 1500 1500 1500 1500 Chan 13...16= 1500 1500 1500 1500

Number of: sequencers=2 sequences=4 steps= 4 Sequencer = [ Gpio Type(0=servo,1=analog) Clock(msec) ChannelNr Default Min Max ] Sequence = ( RC_value(-100...100) to_Repeat Uninterrupted Only_priority_interrupted is_a_Priority_seq ) Step = { Smooth(clocks) Pwm(-100...100) Keep(clocks) } SEQ= [ 6 0 20 3 -100 -100 100 ] ( 50 O ) {0 -100 255} ( 100 P ) {0 100 255} [ 7 0 20 3 -100 -100 100 ] ( 40 O ) {0 -100 255} ( 90 P ) {0 100 255}

Config parameters are OK Press ? + Enter to get help about the commands Gyro configuration is: Channels for : gyro control=9 , Ail stick=10 , Elv stick=11 , Rud stick=12 PID Kp Ki Kd Normal Roll 500 0 500
Normal Pitch 500 0 500
Normal Yaw 500 0 500
Hold Roll 500 500 500
Hold Pitch 500 500 500
Hold Yaw 500 500 500
Gain per axis (-128/127): Roll=127 Pitch=127 Yaw=127 Gyro corections on 1 (1=on whole stick, 2=on half, 3=on a quater)

Gyro mixers are calibrated: Gyro corrections (from center pos in %) on:
Channel 1 center=19 rollRight=-79 rollLeft=58 pitchUp0 pitchDown=0 yawRight=0 yawLeft=0 min=-79 max=78

Satcomix commented 10 months ago

Next test with your own build from 2.9.8, only the version number changed. As soon as I deactivate with GPS_RX=255 I don't get a REBOOT. I previously deactivated and reactivated various values. RPM,LOG, I2C etc... REBOOT again and again. As soon as I deactivate the GPS_RX I have peace of mind, but I don't get any sensor values ​​anymore, only when I deactivate GPS_TX=255 does everything go back to normal.

Rebooted by Watchdog! Error in parameters: GPS_TX and GPS_RX must both be defined or unused

Attention: error in config parameters Press ? + Enter to get help about the commands

Version = 2.9.9 Function GPIO Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 255 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 255 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 13 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 8 9 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 10 11 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29) RGB led . . . . . . . . . = 18 (RGB = 0, 1, 2, ..., 29) Logger . . . . . . . . . = 0 (LOG = 0, 1, 2, ..., 29) ESC . . . . . . . . . . . = 255 (ESC_PIN= 0, 1, 2, ..., 29)

Esc type is not defined

Protocol is Fbus(Frsky) CRSF baudrate = 420000 Logger baudrate = 115200 PWM is generated at = 50 Hz

Voltage parameters: Scales : 1.000000 , 1.000000 , 0.100000 , 1.000000 Offsets: 0.000000 , 0.000000 , 2.000000 , 0.000000 One temperature sensor is connected on V3 RPM multiplier = 1.000000 Baro sensor is not detected Acc/Gyro is not detected Airspeed sensor is not detected Vspeed compensation channel = 5 First analog to digital sensor is not detected Second analog to digital sensor is not detected Foreseen GPS type is Ublox (configured by oXs) :GPS is not (yet) detected Led color is normal (not inverted) Failsafe uses predefined values Chan 1...4 = 1500 1500 1500 1500 Chan 5...8 = 1500 1500 1500 1500 Chan 9...12 = 1500 1500 1500 1500 Chan 13...16= 1500 1500 1500 1500

Number of: sequencers=2 sequences=4 steps= 4 Sequencer = [ Gpio Type(0=servo,1=analog) Clock(msec) ChannelNr Default Min Max ] Sequence = ( RC_value(-100...100) to_Repeat Uninterrupted Only_priority_interrupted is_a_Priority_seq ) Step = { Smooth(clocks) Pwm(-100...100) Keep(clocks) } SEQ= [ 6 0 20 3 -100 -100 100 ] ( 50 O ) {0 -100 255} ( 100 P ) {0 100 255} [ 7 0 20 3 -100 -100 100 ] ( 40 O ) {0 -100 255} ( 90 P ) {0 100 255} Error in parameters: GPS_TX and GPS_RX must both be defined or unused

Attention: error in config parameters Press ? + Enter to get help about the commands Gyro configuration is: Channels for : gyro control=9 , Ail stick=10 , Elv stick=11 , Rud stick=12 PID Kp Ki Kd Normal Roll 500 0 500
Normal Pitch 500 0 500
Normal Yaw 500 0 500
Hold Roll 500 500 500
Hold Pitch 500 500 500
Hold Yaw 500 500 500
Gain per axis (-128/127): Roll=127 Pitch=127 Yaw=127 Gyro corections on 1 (1=on whole stick, 2=on half, 3=on a quater)

Gyro mixers are calibrated: Gyro corrections (from center pos in %) on:
Channel 1 center=19 rollRight=-79 rollLeft=58 pitchUp0 pitchDown=0 yawRight=0 yawLeft=0 min=-79 max=78

mstrens commented 10 months ago

As soon as I deactivate with GPS_RX=255 I don't get a REBOOT. I previously deactivated and reactivated various values. RPM,LOG, I2C etc... REBOOT again and again. As soon as I deactivate the GPS_RX I have peace of mind, but I don't get any sensor values ​​anymore, only when I deactivate GPS_TX=255 does everything go back to normal.

This is "normal": You had reboot with TX and RX activated (this is the issue to be solved). When you send the command GPS_RX=255, oXs detect that the config is inconsistent (not valid). Then it discard all process (no PWM/no telemetry/...). The only think it does is handling the USB commands. So, if afterwards you enter the command GPS_TX=255, oXs detect that the config is valid and works as expected.

The idea to find the issue is now to start from a situation where you have the reboot issue. Then you enter one command (other than GPS_TX=255 and GPS_RX=255) to disable one function (e.g logger). If the reboot issue is solved, then you probably found the combination that generates the issue. Still check that the config is still valid (otherwise having no reboot is "normal".

Important: for the gyro function I had to restructure some part of the code that have an impact on PWM/sequencer/camera/logger. I hope I did not introduce new bugs. Please use now my version 2.9.9. Sorry for that. Thanks again for all the time you take for testing. It would be easier if I could reproduce the error but I do not have all components to reproduce your situation.

If the reboot issue, is not solved, then you enter a command to disable another function (e.g. RPM) etc. with Volt1, with Volt2, up to having no other function than GPS.

Satcomix commented 10 months ago

**EDIT: I can not download Version 2.9.9 can you please upload again, thanks.**

Hello Mstrens, Maybe I expressed myself a bit poorly. I just tested everything with version 2.9.8: All options on, board reboots after every 10 seconds, then I deactivated LOG=255, RPM=255, SDA=255, SCL=255, V1 to V4=255. Still reboot every 10 seconds. Then I turned everything back on and deactivated GPS_RX=255. The board stops rebooting but the LED is red because only GPS_RX is deactivated and no telemetry data is sent to the handset. Only after I deactivated GPS_TX=255 was the telemetry data sent. It depends on the UART for the GPS. It doesn't depend on the communication with the Beitian BE250, as I carried out the tests with the GPS connected and disconnected. The strange thing I don't understand is : When I use the original 2.9.8 everything works fine. If I make a build with 2.9.6 myself, everything works fine. If I build a version with 2.9.8 the REBOOT comes. I use the new SDK1.5.1 You don't need to apologize to me as I have been enjoying doing these tests for over a year. I also see that there is a lot of participation in the GYRO concept and that there is certainly a lot of testing going on, which is a good thing.

mstrens commented 10 months ago

So the issue still occurs with log,rpm,sda,scl,V1/V4 disabled. Can you disable other functions (e.g. sequencer) having GPS_TX and RX defined? . When there is nothing anymore to disable, can you

mstrens commented 10 months ago

Here the config I made (see below). Even if functions are activated, I have no sensor/receiver connected. The device is not rebooting.

So, it could be that the issue occurs only when there are some signals. If this is the case, you could perhaps try to start the device (keeping the same config) but disconnecting the wires connected to the GPS (to get data from the GPS) and after that to the Fbus.

Function                GPIO  Change entering XXX=yyy (yyy=255 to disable)

Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 255 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 0 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 1 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 255 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 29 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 6 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 7 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 2 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 255 255 255 255 (V1 / V4 = 26, 27, 28, 29) RGB led . . . . . . . . . = 16 (RGB = 0, 1, 2, ..., 29) Logger . . . . . . . . . = 4 (LOG = 0, 1, 2, ..., 29) ESC . . . . . . . . . . . = 255 (ESC_PIN= 0, 1, 2, ..., 29)

Esc type is HW4 (Hobbywing V4)

Protocol is Fbus(Frsky) CRSF baudrate = 420000 Logger baudrate = 115200 PWM is generated at = 50 Hz

Voltage parameters: Scales : 1.000000 , 1.000000 , 1.000000 , 1.000000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 No temperature sensors are connected on V3 and V4 RPM multiplier = 1.000000 Baro sensor is detected using MS5611 Sensitivity min = 100 (at 100) , max = 300 (at 1000) Hysteresis = 5 Acc/Gyro is detected using MP6050 Acceleration offsets X, Y, Z = 0 , 0 , 0 Gyro offsets X, Y, Z = 0 , 0 , 0 Airspeed sensor is not detected No Vspeed compensation channel defined; oXs uses default settings First analog to digital sensor is not detected Second analog to digital sensor is not detected Foreseen GPS type is Ublox (configured by oXs) :GPS is not (yet) detected Led color is normal (not inverted) Failsafe type is HOLD

No sequencers are defined

Config parameters are OK Press ? + Enter to get help about the commands Gyro configuration is: Channels for : gyro control=9 , Ail stick=10 , Elv stick=11 , Rud stick=12 PID Kp Ki Kd Normal Roll 500 0 500
Normal Pitch 500 0 500
Normal Yaw 500 0 500
Hold Roll 500 500 500
Hold Pitch 500 500 500
Hold Yaw 500 500 500
Gain per axis (-128/127): Roll=127 Pitch=127 Yaw=127 Gyro corections on 1 (1=on whole stick, 2=on half, 3=on a quater)

Gyro mixers are calibrated: Gyro corrections (from center pos in %) on:
Channel 1 center=19 rollRight=-79 rollLeft=58 pitchUp0 pitchDown=0 yawRight=0 yawLeft=0 min=-79 max=78

Satcomix commented 10 months ago

Which SDK version did you use to build version 2.9.8 with 1.5.0?, and version 2.9.6 with 1.5.1? As I said, I currently only get these errors with a self-built 2.9.8 version.

mstrens commented 10 months ago

I am now only using sdk 1.5.1 since 2.9.4 I uninstalled 1.5.0. All previous (2.9.3 and before) were build with 1.5.0

Satcomix commented 10 months ago

Here is my build. I only change the Version to 2.9.8.1, nothing more. When i deactivate GPS=255 everything is ok. I nuked the board before and copy the new Version 2.9.8.1 Everytime reboot, I deactivate: SBUS_OUT=255

RPM=255

LOG=255

V1=255

V2=255

V3=255

V4=255

Temp=0

SDA=255

SCL=255

GPS_TX=255

GPS_RX=255

processing cmd

Version = 2.9.8.1 Function GPIO Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 255 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 12 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 13 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 255 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 255 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 255 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 255 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 255 255 255 255 (V1 / V4 = 26, 27, 28, 29) RGB led . . . . . . . . . = 16 (RGB = 0, 1, 2, ..., 29) Logger . . . . . . . . . = 255 (LOG = 0, 1, 2, ..., 29) ESC . . . . . . . . . . . = 255 (ESC_PIN= 0, 1, 2, ..., 29)

With GPS_RX and TX=255 deactivate the reboot is missed. Here is my Build folder with Version 2.9.8.1 oXs_on_RP2040-test.zip

mstrens commented 10 months ago

Did you try with this config (and GPS activated) to disconnect the wire used by the GPS to transmit his data so that there are no signal coming in on this pin.

Edit: with "this" config I mean "your"

Satcomix commented 10 months ago

I also disconnect the wire to GPS I think it is something with my VSCode/CMake, i dont know. I make a new build with Ver 2.9.0, no chance with GPS everytime reboot. I made an new build with SDK1.5.1 and it works, but i dont know anymore the version number.

mstrens commented 10 months ago

Did you also disconnected the wire from the receiver (just to see if it reboot continuously)?

If you have the issue when the RP2040 is connected to nothing and GPS is activated, I can try to reproduce it on my device. Do you change some parameters in the config.h file or on some other places when you build your own version? If so, let me know what and I can make a version with the same parameters as you to test it on my side.

Satcomix commented 10 months ago

I dont disconnect the receiver wire, because of the LED colour, you cant see if some thing wrong. I only change the Version number.

mstrens commented 10 months ago

The idea is just to see if the RP2040 reboot continuously. Normally you can see it with the color or also if the usb/serial connexion is diconnected/reconnected.

Satcomix commented 10 months ago

Good morning Mstrens, This morning I started the tests from the beginning, so that after all the confusion I know exactly what works and what doesn't. To rule out that it is due to VScode/CMake, I successfully activated version 2.8.0-main with Pico SDK 1.5.1 with all possible functions, all sensors and camera stabilizers work and are displayed plausibly on the handset with FBUS protocol. I'm now trying to find the version in which the problem with GPS UART and the build error with VSCode/CMake first occurred. I will then continue reporting under the LOG/RPM issue, as this one has become too long. Greetings, Torsten

mstrens commented 10 months ago

Just to be sure: When you use Vscode/cmake you have to select a kit. Do you selected GCC 10.3.1 arm-non-eabi like foreseen in the sdk instructions?

Satcomix commented 10 months ago

Yes, GCC 10.3.1 [variant] Neue Varianten wurden geladen. [kit] Erfolgreich geladen: 1 Kits von C:\Users\Syracuse\AppData\Local\CMakeTools\cmake-tools-kits.json [proc] Befehl wird ausgeführt: "C:\Program Files\Raspberry Pi\Pico SDK v1.5.1\cmake\bin\cmake.EXE" --version [proc] Befehl wird ausgeführt: "C:\Program Files\Raspberry Pi\Pico SDK v1.5.1\cmake\bin\cmake.EXE" -E capabilities [proc] Befehl wird ausgeführt: "C:\Program Files\Raspberry Pi\Pico SDK v1.5.1\gcc-arm-none-eabi\bin\arm-none-eabi-gcc.exe" -v

Satcomix commented 10 months ago

Hello Mstrens, Short information for you. As I have often mentioned, I use my Pimoroni Servo2040 boards for all tests of the oXs-RP2040 software. They are larger than a Waveshare RP2040-Zero, but all GPio connections are routed to the outside via pin headers and QWIC connections. There is also a 74LV4051BQ multiplexer onboard for measuring 8 additional values. I have now been able to successfully control this with the 2x10 button LUA script on my FrSky X20S and Pro in FBUS protocol and the oXs sequencer via the GPio22, 24 and 25****, and I receive the 8 measured values ​​as a V4 telemetry value (GPio29) on my handset. Thank you for your work and effort. Greetings, Torsten

Satcomix commented 10 months ago

Hello Mstrens, I noticed two things in version 2.9.19, which were already present in the previous versions. 1.:The GPS (Beitian BE-250 M10) initializes normally with GPS=U at 10Hz. After some time, for whatever reason, it switches back to 1Hz (default). Unfortunately, I haven't been able to pinpoint the cause yet, whether it has to do with a remote control command or a command in the terminal. I think it happens the moment the GPS gets a 3D fix. It doesn't happen regularly either, just every now and then. 2.: When using the sequencer, the first sequence (occupancy/activation of the GPio ports) is only loaded after the handset is switched on. Wouldn't it make more sense to load the sequence directly so that the ports show a certain setting (default). SEQ= [ 6 0 20 9 -100 -100 100 ] ----(set -100 at GPio6 first as default value) ( 50 P ) {0 -100 20} ( 100 O ) {0 100 20} {0 -100 20} [ 7 0 20 9 -100 -100 100 ] -----(set -100 at GPio7 first as defalt value) ( 50 P ) {0 -100 20} ( 100 O ) {0 100 20} {0 -100 20}

I had already written something on the subject of Gyro learning Sequence and PWM values. Increasing the margin now means cutting the PWM range from 988 to min 1000 and 2012 to max 2000. The learning process started centered Ail right Ch1=2001 Ch2=1500 Ch3=1501 Ch4=1500 Ail left Ch1=1000 Ch2=1500 Ch3=1500 Ch4=1500 Elv up Ch1=1500 Ch2=1993 Ch3=1500 Ch4=1500 Elv down Ch1=1500 Ch2=1007 Ch3=1500 Ch4=1500 Rud right Ch1=1500 Ch2=1500 Ch3=1505 Ch4=1990 Rud left Ch1=1500 Ch2=1500 Ch3=1500 Ch4=1000 Cal mixer is done; switch may be changed

Second step of learning process started

Gyro calibration: Stick Ail_Right on channel 1 at 100 % Stick Elv Up on channel 2 at 100 % Stick Rud_Right on channel 4 at 100 %

Gyro mixers are calibrated: Sticks centered at: Ail=0 % Elv=0 % Rud0 % Gyro corrections (from center pos in %) on:

End of learning process; result will be saved in flash

Greetings, Torsten

mstrens commented 10 months ago

About the GPS: oXs sent some commands to the GPS at startup (when type is U). oXs currently does not check if the commands are accepted or not. It uses only one pio/sm for sending command to the gps and receiving data from the GPS and this does not allow full duplex. After sending the commands to configure the GPS, I do not know in which state was this GPIO (perhaps floating). I added in 2.9.21 some code to force the GPIO to stay at level HIGH. Still I am not sure it will solve the issue.

Did you noticed that

About the sequencer: From my point of view, it is logical that the sequencer does not provide PWM signal when it did not get Rc channel from the the receiver. That is the way most receiver (if not all) are working.

Satcomix commented 10 months ago

_Did you noticed that

GPS data where lost after that GPS already sent some valid data or
does the issue occurs always after a power down and getting no data at all from the GPS (this would show that probably some configuration commands were rejected._

I believe it happens after RECEIVING the first 3D fix. Before it was synchronizing normally, and suddenly it only flashes at 1Hz. Recently, when entering a command in the terminal, you always have to power down because the I2C bus hangs after an internal reboot. The GPS then synchronizes normally because the 3D fix was already there beforehand.

Satcomix commented 10 months ago

Now in this moment it happens again(GPS 1Hz),and I didn't make any input, the handset is off and the 3D fix was already there.

mstrens commented 10 months ago

That is very strange. oXs does not send commands to the GPS once it starts listening. Perhaps you can even check this putting a digital analyser on the GPS TX and RX pin. This digital analyser log should also allow to check if the commands sent by oXs are accepted or rejected.

Satcomix commented 10 months ago

I'll check it with the Logic Analyzer in the near future. The GPS must have accepted the entries because the GPS has been in operation for 3 hours and is only interrupted by any attempts/entries with a reboot or power down. The strange thing is that it only happens after a certain amount of time, and last time I didn't make any changes to the system for at least 15 minutes beforehand.

Satcomix commented 10 months ago

The only way for something like this to happen would be a short interruption in the power supply, for example when I plug in or unplug a measuring device/servo etc. If the UART/SM is overloaded, the GPS would simply continue transmitting with the last configuration (10Hz). I will continue to check and report.

mstrens commented 10 months ago

After switching from 10hz to 1hz, I presume that the GPS still continue to transmit his data. If it is so, then I expect it can't be caused by a short interruption in the power supply. I expect that after a power interruption, the GPS performs a reset. I presume that then it does not generate the frames as expected by oXs and so oXs should not provide GPS data anymore.

Satcomix commented 7 months ago

Hello Mstrens, I still have a few questions about the sequencer. We currently have 21 sequences, i.e. 20+1 values ​​in 10% steps, 1500us=0% I wanted to base the build on 25 values ​​= 24+1 sequences for 12 functions ON/OFF or servos. I.e. instead of 10% values ​​in one direction starting from 1500us=0%, I would like to have 12 values ​​i.e. 8.33% values. I have already adjusted/changed some values ​​in parameter.h m=- or p= and parameter.cpp. I don't get an error message in the oXs terminal, but it doesn't work. Where do I set the level value of 8.33%, and what else do I have to change??? Many thanks for the support. With kind regards, Torsten

mstrens commented 7 months ago

In sequencer.cpp, you have

define SEQ_NUMBER_OF_INTERVALS 20

You can try to increase the number of intervals. I am not 100% sure that it is the single change to make but I think so.

Satcomix commented 7 months ago

Hello Mstrens, Many thanks for the answer. I'll try again. Regards, Torsten

Satcomix commented 7 months ago

Hello Mstrens, I've made some changes and it just doesn't work. Could you please take a look at it, but please only if you have time. Thank you, Torsten oXs_Sequencer_24+1.txt src.zip

mstrens commented 7 months ago

On github you can find the changes I made when I switched from 8 to 20 ranges. To do so, you select the file sequencer.cpp and you click on a button "history" You get a list with the commits having changes for this file. One of them is named 21 values for sequencer. You can see the changes I made. To increase the number of ranges you have to adapt also the list of allowed values. There is a line (in param.cpp) with "if (( tempIntTable[0] % 10) != 0)" that check that the last digit is "0" There is also a list of allowed values (in param.h) : enum CH_RANGE : int8_t { m100=-100, m90=-90, m80=-80, m70=-70, m60=-60, m50 = -50, m40=-40, m30=-30, m20=-20, m10=-10, m0 = 0, p0=0, p10=10 , p20=20 , p30=30 , p40=40 , p50=50, p60=60 , p70=70 , p80=80 , p90=90 , p100=100 , dummy = 127

Satcomix commented 7 months ago

Hello Mstrens, Thank you for reply. I made some changes: param.h enum CH_RANGE : int8_t { m96=-96 , m88=-88 , m80=-80 , m72=-72 , m64=-64 , m56=-56 , m48=-48 , m40=-40 , m32=-32 , m24=-24 , m16=-16 , m8=-8 , m0 = 0 , p0=0, p8=8 , p16=16 , p24=24 , p32=32 , p40=40 , p48=48 , p56=56 , p64=64 , p72=72 , p80=80 , p88=88 , p96=96 , dummy = 127

sequencer.cpp

define SEQ_NUMBER_OF_INTERVALS 24

define DEBUG_SIMULATE_SEQ_RC_CHANNEL_STEP 42.66 // = (2012-988)/24 = 42.6666

if (( tempIntTable[0] % 8) != 0){ printf("Error: for sequence %i, Rc channel value must be a multiple of 8 (8, 16, ...96, -8, -16,...-96\n" , sequenceIdx+1); return false;

Must i change 10 to 8 at the two places??? pvalue++; for (uint8_t i = 5 ; i < 8; i++) { errno = 0; tempIntTable[i] = strtol(pvalue , &ptr ,10); // convert to integer starting from pvalue; ptr point to the first non converted char; skip whitespace before // *ptr = 0 when no error

tempIntTable[0] = strtol(pvalue , &ptr ,10); // convert Rc value to integer // *ptr = 0 when no error

Cmd to execute: SEQ=[0 1 20 8 0 0 100] (48 P) {0 0 1} (96 O) {0 100 1} [1 1 20 8 0 0 100] (40 P) {0 0 1} (88 O) {0 100 1} [2 1 20 8 0 0 100] (32 P) {0 0 1} (80 O) {0 100 1} [3 1 20 8 0 0 100] (24 P) {0 0 1} (72 O) {0 100 1} [4 1 20 8 0 0 100] (16 P) {0 0 1} (64 O) {0 100 1} [5 1 20 8 0 0 100] (8 P) {0 0 1} (56 O) {0 100 1} [6 1 20 8 0 0 100] (-98 O) {0 100 1} (-48 P) {0 0 1} [7 1 20 8 0 0 100] (-88 O) {0 100 1} (-40 P) {0 0 1} [8 1 20 8 0 0 100] (-80 O) {0 100 1} (-32 P) {0 0 1} [9 1 20 8 0 0 100] (-72 O) {0 100 1} (-24 P) {0 0 1} [10 1 20 8 0 0 100] (-64 O) {0 100 1} (-16 P) {0 0 1} [11 1 20 8 0 0 100] (-56 O) {0 100 1} (-8 P) {0 0 1} Error : parameter 3 of sequencer 1 can't be converted to an integers Error converting the sequencer definition numner 1

Error in syntax or in a parameter: command SEQ= is discarded

Thank you for your help. regards, Torsten

mstrens commented 7 months ago

In line like tempIntTable[i] = strtol(pvalue , &ptr ,10); you must keep 10 because it just says that the value entered in the terminal is in decimal base (and not octal) (when converting a string to a numerical value)

Satcomix commented 7 months ago

In line like tempIntTable[i] = strtol(pvalue , &ptr ,10); you must keep 10 because it just says that the value entered in the terminal is in decimal base (and not octal) (when converting a string to a numerical value)

Ah, ok. So both 10 are ok. Can i simple delete !=0 ?, so that there is no proof for 0. if (( tempIntTable[0] % 8) != 0){