kopia lustrzana https://github.com/projecthorus/horusdemodlib
More additions for combined v1/v2
rodzic
03038b3823
commit
96e71ac04c
|
@ -17,5 +17,19 @@
|
|||
["test_counter", "none"],
|
||||
["test_int_field", "none"]
|
||||
]
|
||||
},
|
||||
"4FSKTEST32": {
|
||||
"struct": "<BBBBBBBBB",
|
||||
"fields": [
|
||||
["test_field 1", "none"],
|
||||
["test_field 2", "none"],
|
||||
["test_field 3", "none"],
|
||||
["test_field 4", "none"],
|
||||
["test_field 5", "none"],
|
||||
["test_field 6", "none"],
|
||||
["test_field 7", "none"],
|
||||
["test_field 8", "none"],
|
||||
["test_field 9", "none"],
|
||||
]
|
||||
}
|
||||
}
|
|
@ -6,7 +6,7 @@ import logging
|
|||
import requests
|
||||
|
||||
# Global payload list - Basic version
|
||||
HORUS_PAYLOAD_LIST = {0:'4FSKTEST', 1:'HORUSBINARY', 65535:'HORUSTEST'}
|
||||
HORUS_PAYLOAD_LIST = {0:'4FSKTEST', 1:'HORUSBINARY', 257:'4FSKTEST32', 65535:'HORUSTEST'}
|
||||
|
||||
# URL for payload list
|
||||
PAYLOAD_ID_LIST_URL = "https://raw.githubusercontent.com/projecthorus/horusdemodlib/master/payload_id_list.txt"
|
||||
|
@ -31,6 +31,20 @@ HORUS_CUSTOM_FIELDS = {
|
|||
["test_counter", "none"],
|
||||
["test_int_field", "none"]
|
||||
]
|
||||
},
|
||||
"4FSKTEST32": {
|
||||
"struct": "<BBBBBBBBB",
|
||||
"fields": [
|
||||
["test_field 1", "none"],
|
||||
["test_field 2", "none"],
|
||||
["test_field 3", "none"],
|
||||
["test_field 4", "none"],
|
||||
["test_field 5", "none"],
|
||||
["test_field 6", "none"],
|
||||
["test_field 7", "none"],
|
||||
["test_field 8", "none"],
|
||||
["test_field 9", "none"],
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ def main():
|
|||
parser.add_argument("--debuglog", type=str, default="horusb_debug.log", help="Write debug log to this file.")
|
||||
parser.add_argument("--payload-list", type=str, default="payload_id_list.txt", help="List of known payload IDs.")
|
||||
parser.add_argument("--custom-fields", type=str, default="custom_field_list.json", help="List of payload Custom Fields")
|
||||
parser.add_argument("--nodownload", action="store_true", default=False, help="Do not download new lists.")
|
||||
# parser.add_argument("--ozimux", type=int, default=-1, help="Override user.cfg OziMux output UDP port. (NOT IMPLEMENTED)")
|
||||
# parser.add_argument("--summary", type=int, default=-1, help="Override user.cfg UDP Summary output port. (NOT IMPLEMENTED)")
|
||||
parser.add_argument("-v", "--verbose", action="store_true", default=False, help="Verbose output (set logging level to DEBUG)")
|
||||
|
@ -94,13 +95,18 @@ def main():
|
|||
|
||||
|
||||
if args.rtty == False:
|
||||
# Initialize Payload List
|
||||
horusdemodlib.payloads.HORUS_PAYLOAD_LIST = init_payload_id_list(filename=args.payload_list)
|
||||
|
||||
if args.nodownload:
|
||||
logging.info("Using local lists.")
|
||||
horusdemodlib.payloads.HORUS_PAYLOAD_LIST = read_payload_list(filename=args.payload_list)
|
||||
horusdemodlib.payloads.HORUS_CUSTOM_FIELDS = read_custom_field_list(filename=args.custom_fields)
|
||||
else:
|
||||
# Downlaod
|
||||
horusdemodlib.payloads.HORUS_PAYLOAD_LIST = init_payload_id_list(filename=args.payload_list)
|
||||
horusdemodlib.payloads.HORUS_CUSTOM_FIELDS = init_custom_field_list(filename=args.custom_fields)
|
||||
|
||||
logging.info(f"Payload list contains {len(list(horusdemodlib.payloads.HORUS_PAYLOAD_LIST.keys()))} entries.")
|
||||
|
||||
# Init Custom Fields List
|
||||
horusdemodlib.payloads.HORUS_CUSTOM_FIELDS = init_custom_field_list(filename=args.custom_fields)
|
||||
logging.info(f"Custom Field list contains {len(list(horusdemodlib.payloads.HORUS_CUSTOM_FIELDS.keys()))} entries.")
|
||||
|
||||
# Start the Habitat uploader thread.
|
||||
|
|
|
@ -75,3 +75,5 @@
|
|||
65, LUX3
|
||||
66, OH3VHH-4FSK
|
||||
67, SQ3KNL-4FSK
|
||||
# IDs for 32-byte payloads
|
||||
257, 4FSKTEST32
|
|
@ -149,6 +149,15 @@ int main(int argc,char *argv[]) {
|
|||
input_payload.Hours = 12;
|
||||
input_payload.Minutes = 34;
|
||||
input_payload.Seconds = 56;
|
||||
input_payload.dummy1 = 1;
|
||||
input_payload.dummy2 = 2;
|
||||
input_payload.dummy3 = 3;
|
||||
input_payload.dummy4 = 4;
|
||||
input_payload.dummy5 = 5;
|
||||
input_payload.dummy6 = 6;
|
||||
input_payload.dummy7 = 7;
|
||||
input_payload.dummy8 = 8;
|
||||
input_payload.dummy9 = 9;
|
||||
input_payload.Counter = counter;
|
||||
input_payload.Checksum = horus_l2_gen_crc16((unsigned char*)&input_payload, nbytes-2);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue