Config data for tracker page
This commit is contained in:
parent
c00a0ecbed
commit
a8cf34343f
|
@ -13,6 +13,9 @@
|
||||||
|
|
||||||
Feature possibilities
|
Feature possibilities
|
||||||
- switch between North up / Heading up
|
- switch between North up / Heading up
|
||||||
|
- filter
|
||||||
|
- zoom
|
||||||
|
- special vessel symbols
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,10 @@
|
||||||
Drop / raise function in device OBP40 has to be done inside
|
Drop / raise function in device OBP40 has to be done inside
|
||||||
config mode because of limited number of buttons.
|
config mode because of limited number of buttons.
|
||||||
|
|
||||||
|
Save position in FRAM
|
||||||
|
Alarm: gps fix lost
|
||||||
|
switch unit feet/meter
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define anchor_width 16
|
#define anchor_width 16
|
||||||
|
|
|
@ -7,6 +7,14 @@
|
||||||
/*
|
/*
|
||||||
Electric propulsion
|
Electric propulsion
|
||||||
|
|
||||||
|
- Current, voltage, power
|
||||||
|
- 12, 24, 48 etc. Voltage
|
||||||
|
- rpm
|
||||||
|
- throttle position
|
||||||
|
- controller state
|
||||||
|
- error codes
|
||||||
|
- temperature engine, controller, batteries
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PageEPropulsion : public Page
|
class PageEPropulsion : public Page
|
||||||
|
|
|
@ -788,3 +788,70 @@ dict =
|
||||||
BMP:Windows bitmap (BMP)
|
BMP:Windows bitmap (BMP)
|
||||||
category = OBP60 Pages
|
category = OBP60 Pages
|
||||||
capabilities = obp60:true
|
capabilities = obp60:true
|
||||||
|
|
||||||
|
# WIP
|
||||||
|
|
||||||
|
[trackerType]
|
||||||
|
label = Tracker Type
|
||||||
|
type = list
|
||||||
|
default = off
|
||||||
|
description = Type of tracker to use [OFF|SDCARD|SERVER|HERO]
|
||||||
|
dict = OFF:No tracker
|
||||||
|
SDCARD:Log to SD-Card
|
||||||
|
SERVER:Log to Server
|
||||||
|
HERO:Connect with Regatta Hero
|
||||||
|
category = OBP60 Pages
|
||||||
|
capabilities = obp60:true
|
||||||
|
|
||||||
|
[trackerOrganization]
|
||||||
|
label = Tracker team
|
||||||
|
type = string
|
||||||
|
default = demo
|
||||||
|
description = Tracker organization for login
|
||||||
|
category = OBP60 Pages
|
||||||
|
|
||||||
|
[trackerPasscode]
|
||||||
|
label = Tracker team
|
||||||
|
type = password
|
||||||
|
default = 291758
|
||||||
|
description = Your tracker team you belong to. E.g. short name of association
|
||||||
|
category = OBP60 Pages
|
||||||
|
|
||||||
|
[trackerTeam]
|
||||||
|
label = Tracker team
|
||||||
|
type = string
|
||||||
|
default = none
|
||||||
|
description = Your tracker team you belong to. E.g. short name of association
|
||||||
|
category = OBP60 Pages
|
||||||
|
|
||||||
|
[trackerHandicap]
|
||||||
|
label = Boat handicap
|
||||||
|
type = number
|
||||||
|
default = 100
|
||||||
|
check = checkMinMax
|
||||||
|
min = 50
|
||||||
|
max = 1000
|
||||||
|
description = The handicap value of your boat. E.g. yardstick value
|
||||||
|
category = OBP60 Pages
|
||||||
|
|
||||||
|
[boatName]
|
||||||
|
label = Boat Name
|
||||||
|
type = string
|
||||||
|
default = Unsinkbar II
|
||||||
|
description = name of your boat
|
||||||
|
category = OBP60 Pages
|
||||||
|
|
||||||
|
[boatClass]
|
||||||
|
label = Boat Class
|
||||||
|
type = string
|
||||||
|
default = One off
|
||||||
|
description = Class name of your boat if available or "One off"
|
||||||
|
category = OBP60 Pages
|
||||||
|
|
||||||
|
[sailNumber]
|
||||||
|
label = Sail number
|
||||||
|
type = string
|
||||||
|
default = GER 11
|
||||||
|
description = Identification number on sail
|
||||||
|
category = OBP60 Pages
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
# Import("env")
|
||||||
|
|
||||||
|
def get_firmware_specifier_build_flag():
|
||||||
|
#ret = subprocess.run(["git", "describe"], stdout=subprocess.PIPE, text=True) #Uses only annotated tags
|
||||||
|
ret = subprocess.run(["git", "describe", "--tags"], stdout=subprocess.PIPE, text=True) #Uses any tags
|
||||||
|
build_version = ret.stdout.strip()
|
||||||
|
build_flag = "-D AUTO_VERSION=\\\"" + build_version + "\\\""
|
||||||
|
print ("Firmware Revision: " + build_version)
|
||||||
|
return (build_flag)
|
||||||
|
|
||||||
|
#env.Append(
|
||||||
|
# BUILD_FLAGS=[get_firmware_specifier_build_flag()]
|
||||||
|
#)
|
||||||
|
|
||||||
|
get_firmware_specifier_build_flag()
|
|
@ -0,0 +1,61 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
#
|
||||||
|
# Convert a Gimp-created XBM file to bitmap useable by drawBitmap()
|
||||||
|
#
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import re
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
print("Usage: xbmconvert.py <filename>")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
xbmfilename = sys.argv[1]
|
||||||
|
if not os.path.isfile(xbmfilename):
|
||||||
|
print(f"The file '{xbmfilename}' does not exists.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
im = Image.open(xbmfilename)
|
||||||
|
imname = "image"
|
||||||
|
with open(xbmfilename, 'r') as fh:
|
||||||
|
pattern = r'static\s+unsigned\s+char\s+(\w+)_bits$$$$'
|
||||||
|
for line in fh:
|
||||||
|
match = re.search(pattern, line)
|
||||||
|
if match:
|
||||||
|
imname = match.group(1)
|
||||||
|
break
|
||||||
|
bytecount = int(im.width * im.height / 8)
|
||||||
|
|
||||||
|
print(f"#ifndef _{imname.upper()}_H_")
|
||||||
|
print(f"#define _{imname.upper()}_H_ 1\n")
|
||||||
|
print(f"#define {imname}_width {im.width}")
|
||||||
|
print(f"#define {imname}_height {im.height}")
|
||||||
|
print(f"const unsigned char {imname}_bits[{bytecount}] PROGMEM = {{")
|
||||||
|
|
||||||
|
n = 0
|
||||||
|
print(" ", end='')
|
||||||
|
f = im.tobytes()
|
||||||
|
|
||||||
|
switched_bytes = bytearray()
|
||||||
|
for i in range(0, len(f), 2):
|
||||||
|
# Switch LSB and MSB
|
||||||
|
switched_bytes.append(f[i + 1]) # Append MSB
|
||||||
|
switched_bytes.append(f[i]) # Append LSB
|
||||||
|
|
||||||
|
#for b in im.tobytes():
|
||||||
|
for b in switched_bytes:
|
||||||
|
#b2 = 0
|
||||||
|
#for i in range(8):
|
||||||
|
# # b2 |= ((b >> i) & 1) << (7 - i)
|
||||||
|
# b2 <<= 1
|
||||||
|
# b2 |= b & 1
|
||||||
|
# b >>= 1
|
||||||
|
n += 1
|
||||||
|
print(f"0x{b:02x}", end='')
|
||||||
|
if n < bytecount:
|
||||||
|
print(', ', end='')
|
||||||
|
if n % 12 == 0:
|
||||||
|
print("\n ", end='')
|
||||||
|
print("};\n\n#endif")
|
Loading…
Reference in New Issue