Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup script without errors, no Parameter XXX not found #12832

Closed
BazookaJoe1900 opened this issue Aug 28, 2019 · 15 comments
Closed

Startup script without errors, no Parameter XXX not found #12832

BazookaJoe1900 opened this issue Aug 28, 2019 · 15 comments

Comments

@BazookaJoe1900
Copy link
Member

BazookaJoe1900 commented Aug 28, 2019

I Think that if during start up parameter is not found is shouldn't be an error, but info. because current implementation assume that its ok not to have parameter, and just treat its non-exist value as 0.
This is relevant to comparison of parameter. Setting non-exist parameter should be kept as error
Unless you REALY need the parameter, and its mandatory. I don’t' know if there is such competition that REALY need the parameter.

In general , seeing error should trigger red alerts.

Do you agree?

@julianoes
Copy link
Contributor

I think I agree. Can you provide an example that you're seeing. And suggest where or how we can improve that?

@BazookaJoe1900
Copy link
Member Author

BazookaJoe1900 commented Aug 30, 2019

The post has Edited:
I have tested it again on pixhawk 4, (fmu-v5, master) and I don't see "Parameter XXX not found" errors, (edited part here) on regular build, on multicopter build there are few Parameter XXX not found, for example:

ERROR [param] Parameter SENS_EN_BATT not found
ERROR [param] Parameter SENS_EN_MB12XX not found
ERROR [param] Parameter SENS_EN_PGA460 not found
ERROR [param] Parameter SENS_EN_SF1XX not found
ERROR [param] Parameter SENS_EN_TRANGER not found
ERROR [param] Parameter TRIG_MODE not found
ERROR [param] Parameter UAVCAN_ENABLE not found

there are few options how to handle on-exist parameter

  1. keep current behavior - if there is comparison to parameter that doesn't exists, trigger error. I don't like it because its trigger many false errors
  2. Remove any Error - Don't like it again, because there are some cases that parameter must be exist, and if it doesn't, its really error. for example, many SYS_AUTOSTART comparison. if SYS_AUTOSTART doesn't exist (for any reason) its error
  3. Reduce the error to Info - Don't like it too... its a middleway that just confuse and doesn't separate between real errors.
  4. Create new "silent" comparation. that allows the parameter to be missed, and doesn't trigger any info/error. This is my prefer option

@julianoes
What do you think?

There are other errors, and warnings on the startup, but not about parameters, but other staff.

[boot] Rev 0x0 : Ver 0x0 V500                                                                           
[boot] Fault Log info File No 4 Length 3177 flags:0x01 state:1                                          
[boot] Fault Log is Armed                                                                               
sercon: Registering CDC/ACM serial driver                                                               
sercon: Successfully registered the CDC/ACM serial driver                                               
HW arch: PX4_FMU_V5                                                                                     
HW type: V500                                                                                           
HW version: 0x00000000                                                                                  
HW revision: 0x00000000                                                                                 
FW git-hash: ce96f8e1a9dbd8f6d067d598c2d87103a8f5950b                                                   
PX4 FW version: Release 1.9.2 (17367807)                                                                
Flying Production FW version: 1.4.0 0 (17039360)                                                        
FW git-branch: master                                                                                   
Parameters version: 17.3.93.60                                                                          
OS: NuttX                                                                                               
OS version: Release 7.22.0 (118882559)                                                                  
OS git-hash: 4803238ec9db4b6d30b6c6cb2eab314d30d6c246                                                   
Build datetime: Aug 30 2019 15:47:15                                                                    
Build uri: localhost                                                                                    
Toolchain: GNU GCC, 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]                    
PX4GUID: 000200000000323634353237511800240029                                                           
MCU: STM32F76xxx, rev. Z                                                                                
[hardfault_log] Fault Log is Armed                                                                      
INFO  [tune_control] Publishing standard tune 1                                                         
INFO  [param] selected parameter default file /fs/mtd_params                                            
Board defaults: /etc/init.d/rc.board_defaults                                                           
nsh: rgbled: command not found                                                                          
nsh: rgbled_ncp5623c: command not found                                                                 
nsh: rgbled_pwm: command not found                                                                      
nsh: blinkm: command not found                                                                          
Board sensors: /etc/init.d/rc.board_sensors                                                             
WARN  [mpu6000] no device on bus #3 (SPI1)                                                              
MPU6000 on SPI bus 1 at 0 (1000 KHz)                                                                    
WARN  [mpu6000] unexpected ID 0xfd accepted                                                             
BMI055_ACCEL on SPI bus 1 at 3 (10000 KHz)                                                              
BMI055_GYRO on SPI bus 1 at 2 (10000 KHz)                                                               
INFO  [ist8310] no device on bus 1                                                                      
INFO  [ist8310] no device on bus 2                                                                      
nsh: hmc5883: command not found                                                                         
nsh: qmc5883: command not found                                                                         
nsh: lis3mdl: command not found                                                                         
IST8310 on I2C bus 3 at 0x0e (bus: 100 KHz, max: 400 KHz)                                               
nsh: pmw3901: command not found                                                                         
MS5611_SPI on SPI bus 4 at 0 (20000 KHz)                                                                
ERROR [param] Parameter SENS_EN_BATT not found                                                          
ERROR [param] Parameter SENS_EN_MB12XX not found                                                        
ERROR [param] Parameter SENS_EN_PGA460 not found                                                        
ERROR [param] Parameter SENS_EN_SF1XX not found                                                         
ERROR [param] Parameter SENS_EN_TRANGER not found                                                       
ERROR [param] Parameter TRIG_MODE not found                                                             
ERROR [param] Parameter UAVCAN_ENABLE not found                                                         
Starting Main GPS on /dev/ttyS0                                                                         
Starting MAVLink on /dev/ttyS1                                                                          
INFO  [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS1 @ 57600B                                
ERROR [param] Parameter MNT_MODE_IN not found                                                           
ERROR [param] Parameter MNT_MODE_OUT not found                                                          
INFO  [px4io] default PWM output device                                                                 
INFO  [init] Mixer: /etc/mixers/quad_x.main.mix on /dev/pwm_output0                                     
ERROR [param] Parameter CAM_CAP_FBACK not found                                                         
ERROR [param] Parameter WEST_EN not found                                                               
ERROR [param] Parameter MNT_MODE_IN not found                                                           
nsh: vmount: command not found                                                                          
px4flow [212:100]                                                                                       
INFO  [px4flow] scanning I2C buses for device..                                                         
ERROR [param] Parameter TEL_BST_EN not found                                                            
ERROR [param] Parameter UAVCAN_ENABLE not found                                                         
INFO  [logger] logger started (mode=all)                                                                
INFO  [logger] Start file log (type: full)                                                              
                

@dagar
Copy link
Member

dagar commented Sep 1, 2019

@BazookaJoe1900 blinkm might be another good one to put behind a parameter.

image

@dagar
Copy link
Member

dagar commented Sep 1, 2019

FYI px4_work_queue spam will be silenced after #12853.

image

@dagar
Copy link
Member

dagar commented Sep 1, 2019

Lights (rgbled, rgbled_ncp5623c, rgbled_pwm) could be moved to board startup.

@BazookaJoe1900
Copy link
Member Author

for blinkm, pr: add new parameter LIGHT_EN_BLINKM to start blinkm lights #12880

@BazookaJoe1900
Copy link
Member Author

BazookaJoe1900 commented Sep 2, 2019

about pca8574 and oraled, most, if not all boards compile it, but there is no 'pca8574 start'/ 'oraled start' anywhere'.... What to do there?
I think of two options:

  1. is it possible that this driver is not relevant at all, so why to compile it at all
  2. its relevan't but users that do use it, run it at run time by mavlink-shell, extra rcs.extra

@BazookaJoe1900
Copy link
Member Author

BazookaJoe1900 commented Sep 2, 2019

about the onboard leds, before moving them to the boards rcs, I want to cleanup and remove boards that might compile drivers that they don't have.
Here is list I found regaring rgbleds:
where there is no mark, the driver doesn't compiled
where you see '?' its mean I can't (and didn't) test if the HW exist and run well
Where you see 'ok' its mean that the CI started link the driver and its seems to run ok.
where there is 'error' the CI failed to run the driver.
I don't know if there is any option to run external rgbleds from that kind.

platform board rgbled (device rgbled0) rgbled_ncp5623c (device rgbled1) rgbled_pwm
aerotenna ocpoc ?    
airmind mindpx-v2 ?    
atlflight cmake_hexagon      
atlflight eagle ?    
atlflight excelsior ?    
auav esc35-v1      
auav x21 ?    
av x-v1      
beaglebone blue      
bitcraze crazyflie      
emlid navio2      
holybro kakutef7      
intel aerofc-v1      
mro ctrl-zero-f7 ?    
nxp fmuk66-v3 error ok ?
omnibus f4sd ?    
parrot bebop      
px4 cannode-v1      
px4 esc-v1      
px4 fmu-v2 ok    
px4 fmu-v3 ok error ?
px4 fmu-v4 error error  
px4 fmu-v4pro ok error ?
px4 fmu-v5 error error ?
px4 fmu-v5x error error  
px4 io-v2      
px4 raspberrypi      
px4 sitl      
thiemar s2740vc-v1      
uvify core   ?  

@dagar
Copy link
Member

dagar commented Sep 3, 2019

about pca8574 and oraled, most, if not all boards compile it, but there is no 'pca8574 start'/ 'oraled start' anywhere'.... What to do there?
I think of two options:

  1. is it possible that this driver is not relevant at all, so why to compile it at all
  2. its relevan't but users that do use it, run it at run time by mavlink-shell, extra rcs.extra

The pca8574 driver could probably dropped unless someone would like to volunteer to maintain and test it. It has some custom IOCTLs that would be nice to purge.

The oreoled driver is apparently for the solo and isn't properly integrated with PX4. I'm inclined to drop it as well unless someone would like to change that. It's clearly not being used and ends up being a minor distraction when making larger changes or even looking for good examples.

@LorenzMeier
Copy link
Member

Please drop both drivers. We need to focus our resources on what is being used!

@BazookaJoe1900
Copy link
Member Author

BazookaJoe1900 commented Sep 4, 2019

@dagar @LorenzMeier there the list of the other leds (the table I added)
Do you want me to move the driver to each board rc.board_sensors? or rc.board_default?
I can guess some of the '?' I put on the table that need to be removed from compilation of the boards. some I can't tell. I can just keep them....
is there a list of main contributor for each board that we can refer the Q to him/her?

@BazookaJoe1900
Copy link
Member Author

@dagar ping

julianoes pushed a commit that referenced this issue Oct 7, 2019
Remove false errors after comparing parameters that doesn't exists.
as described in #12832
@BazookaJoe1900
Copy link
Member Author

@dagar ping, or should I close this issue?

@dagar
Copy link
Member

dagar commented Nov 27, 2019

What would you like to do here? Personally I'd rather work towards addressing the problem more fundamentally, rather than hiding something we find ugly or annoying.

  1. Some build time mechanism to register or install a driver or modules startup code. If you don't have that driver in the build the little bit of init could won't even be present and won't make the error.
  2. Board manifest so that the set of required things we know are physically present in a configuration can be started automatically.
  3. Deciding what to do about optional external things like i2c magnetometers. If we want to keep probing them it should be more intelligent (scanning the bus and only trying valid addresses, etc). Alternatively I don't think it would be unreasonable to have to set a parameter per bus for what you want.

@BazookaJoe1900
Copy link
Member Author

Agree, closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants