Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # FC_patch_sequence_for_dummy_verify.sh
- if [ "$1" == "Mavic" ]
- then
- # Mavic Pro
- AC_PREFIX=wm220
- FULL_ORIGINAL_FIRMWARE_VERSION="v01.03.0700"
- ORI_VERSION="03.02.30.13"
- ORI_FILEDATE=20170405
- ORI_MODULE_TIMESTAMP="2017-04-05 10:30:27"
- #escape the / from <\module> after copy/pasting the original data here
- 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>'
- elif [ "$1" == "Spark" ]
- # patch_wm220_0306.py
- # HardCoded version of the version in some FC function
- p.patchByteAtAddress(0x53D3DC,hex_parts[0]) #0x0D = 13
- p.patchByteAtAddress(0x53D3DE,hex_parts[1]) #0x1E = 30
- p.patchByteAtAddress(0x53D3EA,hex_parts[2]) #0x2 = 2
- p.patchByteAtAddress(0x53D3EC,hex_parts[3]) #0x3 = 3
- newversioncode = sn_hex
- print("New version code : %s\n" % newversioncode)
- p.patchDataAtAddress(0x50D468,newversioncode)
- p.patchDataAtAddress(0x5242AC,newversioncode)
- p.patchDataAtAddress(0x53D628,newversioncode)
- p.patchDataAtAddress(0x549750,newversioncode)
- # Ascii version of the version string
- p.patchStringAtAddress(0x5968C2,sn)
- p.patchFloatAtAddress(0x4BE56C,-5000.0) # Min altitude relative to home point : default -200.0 m
- p.patchFloatAtAddress(0x4BE570,9000.0) # Max altitude relative to home point : default 1000.0 m
- p.patchFloatAtAddress(0x4BE5B8,32000.0) # Max distance from one waypoint to home point : default 2000.0 m
- p.patchFloatAtAddress(0x4BE634,128000.0) # Max total length of mission : default 30000.0 m
- p.patchFloatAtAddress(0x4BEA70 ,25.0) # Max speed (positive value) : default 15.0 m/s
- p.patchFloatAtAddress(0x4BEA74,-25.0) # Max speed (negative value) : default -15.0 m/s
- p.patchFloatAtAddress(0x4BEA78,-5000.0) # Min altitude relative to home point : default -200.0 m
- p.patchFloatAtAddress(0x4BEA7C,9000.0) # Max altitude relative to home point : default 1000.0 m
- 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