Advertisement
Guest User

DJI_FC_Patcher_0700

a guest
Nov 18th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. # FC_patch_sequence_for_dummy_verify.sh
  2.  
  3. if [ "$1" == "Mavic" ]
  4. then
  5. # Mavic Pro
  6. AC_PREFIX=wm220
  7. FULL_ORIGINAL_FIRMWARE_VERSION="v01.03.0700"
  8. ORI_VERSION="03.02.30.13"
  9. ORI_FILEDATE=20170405
  10. ORI_MODULE_TIMESTAMP="2017-04-05 10:30:27"
  11. #escape the / from <\module> after copy/pasting the original data here
  12. ORI_MODULE_INFO='<module id="0306" version="03.02.30.13" type="" group="ac" size="1537056" md5="61df5e5a394c00cc50e04044597ba22d">wm220_0306_v03.02.30.13_20170405.pro.fw.sig<\/module>'
  13. elif [ "$1" == "Spark" ]
  14.  
  15. # patch_wm220_0306.py
  16.  
  17. # HardCoded version of the version in some FC function
  18. p.patchByteAtAddress(0x53D3DC,hex_parts[0]) #0x0D = 13
  19. p.patchByteAtAddress(0x53D3DE,hex_parts[1]) #0x1E = 30
  20. p.patchByteAtAddress(0x53D3EA,hex_parts[2]) #0x2 = 2
  21. p.patchByteAtAddress(0x53D3EC,hex_parts[3]) #0x3 = 3
  22.  
  23. newversioncode = sn_hex
  24. print("New version code : %s\n" % newversioncode)
  25. p.patchDataAtAddress(0x50D468,newversioncode)
  26. p.patchDataAtAddress(0x5242AC,newversioncode)
  27. p.patchDataAtAddress(0x53D628,newversioncode)
  28. p.patchDataAtAddress(0x549750,newversioncode)
  29.  
  30. # Ascii version of the version string
  31. p.patchStringAtAddress(0x5968C2,sn)
  32.  
  33. p.patchFloatAtAddress(0x4BE56C,-5000.0) # Min altitude relative to home point : default -200.0 m
  34. p.patchFloatAtAddress(0x4BE570,9000.0) # Max altitude relative to home point : default 1000.0 m
  35. p.patchFloatAtAddress(0x4BE5B8,32000.0) # Max distance from one waypoint to home point : default 2000.0 m
  36. p.patchFloatAtAddress(0x4BE634,128000.0) # Max total length of mission : default 30000.0 m
  37. p.patchFloatAtAddress(0x4BEA70 ,25.0) # Max speed (positive value) : default 15.0 m/s
  38. p.patchFloatAtAddress(0x4BEA74,-25.0) # Max speed (negative value) : default -15.0 m/s
  39. p.patchFloatAtAddress(0x4BEA78,-5000.0) # Min altitude relative to home point : default -200.0 m
  40. p.patchFloatAtAddress(0x4BEA7C,9000.0) # Max altitude relative to home point : default 1000.0 m
  41. p.patchFloatAtAddress(0x4BF060,25.0) # Max speed for in-flight change speed message : default 15.0 m/s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement