mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_MSP: change font to fix arrows and added --font and --list-fonts
This commit is contained in:
parent
ad6a1af2fc
commit
d6e3b5834a
@ -21,6 +21,8 @@ import math
|
|||||||
|
|
||||||
parser = argparse.ArgumentParser(description='ArduPilot MSP FPV viewer')
|
parser = argparse.ArgumentParser(description='ArduPilot MSP FPV viewer')
|
||||||
parser.add_argument('--port', default="tcp:localhost:5763", help="port to listen on, can be serial port or tcp:IP:port")
|
parser.add_argument('--port', default="tcp:localhost:5763", help="port to listen on, can be serial port or tcp:IP:port")
|
||||||
|
parser.add_argument('--font', help="font to use", default="freesans")
|
||||||
|
parser.add_argument('--list-fonts', action="store_true", default=False, help="show list of system fonts")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@ -244,7 +246,9 @@ def receive_data():
|
|||||||
return
|
return
|
||||||
msp.parseMspData(buf)
|
msp.parseMspData(buf)
|
||||||
|
|
||||||
font = pygame.font.Font('freesansbold.ttf', 12)
|
if args.list_fonts:
|
||||||
|
print(sorted(pygame.font.get_fonts()))
|
||||||
|
font = pygame.font.SysFont(args.font, 12)
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
last_display_t = time.time()
|
last_display_t = time.time()
|
||||||
|
Loading…
Reference in New Issue
Block a user