File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
3
3
import asyncio
4
+ import base64
4
5
from mavsdk import System
5
6
from mavsdk .rtk import RtcmData
6
7
@@ -13,4 +14,6 @@ async def send_data(data):
13
14
14
15
if __name__ == '__main__' :
15
16
rtcm_data = bytearray (b'\xd3 \x00 mCP\x00 \x8c 2\x16 \x82 \x00 \x00 ,@\x88 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 ~\x9c \xa4 \x9a \x90 \xa2 \x8c \x00 \x00 \x01 \xa7 \xa2 \x1e =gv\x8f \x1f q{\\ x13_\xc9 \xdf \x17 \x02 L$\xb6 \xdd \x17 \x9a .\xe8 \xba \x94 \x02 U6^\xa2 ^\x08 \xac \xf5 \xf4 \x1d \xcc \n \x9d \xe7 \xeb \x04 R\x15 \x92 \x93 \xf9 o\xf2 \xc1 \xb5 -j\xba \xf1 2`@\r \x83 \xc0 \xe8 B\x0f \x05 \xec \x8c \xfc \xc4 \x88 l\xac \x7f \xf1 \x1a R\xc2 \xbc \x87 ' ) # noqa: E501
16
- asyncio .run (send_data (RtcmData (str (rtcm_data ))))
17
+ # In MAVSDK 3.0.0 the data is expected to be base64 encoded string
18
+ base64_rtcm_data = base64 .b64encode (rtcm_data ).decode ('utf-8' )
19
+ asyncio .run (send_data (RtcmData (str (base64_rtcm_data ))))
You can’t perform that action at this time.
0 commit comments