My quad crashes for some unexplicable reason.  The copter would bank right on takeoff; looking at the quad from the rear (viewed from the front this would be a bank to the left)  I hooked up Mission Planner and found the PID values were corrupt.  Specifically, only rate roll and rate pitch.  They had values of "0.1010".  As a computer software developer, this digit pattern is familiar. "1010" is "A" in hexadecimal.

After editing the value in Mission Planner, they still would not write to the EEPROM.

 

The fix was to connect Hyperterminal, erase the EEPROM, and then do a default reset command.

 

i.e. Hyperterminal, <enter><enter><enter> -> erase -> reset.

 

Could this be the same problem that occurred in Virgina at the bull run?

 

This brings to light a fundamental software flaw; there is no CRC check (I mean a 32 bit cyclic redundancy check and not a simple checksum) of the PID/configuration values, or is there (I haven't checked the code)?  A corrupt PID could be catastrophic and the software should take emergency actions...

 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • hi,

    as a computer software developer you should know that a 32bit float with the value of "0.1010" is 3DCED917 in hexadecimal or 111101110011101101100100010111 in binary, see wiki/IEEE_754

    but some PID check routine would be nice indeed, maybe the easiest way is to store a hash value of all pids, should do the job, and fit the limited power of the controller

    cheers,

    tom

This reply was deleted.

Activity