@@ -76,6 +76,11 @@ async def websocket_handler(self, request: BaseRequest):
7676 "field" : "infuse_id" ,
7777 "headerHozAlign" : "center" ,
7878 },
79+ {
80+ "title" : "App ID" ,
81+ "field" : "application" ,
82+ "headerHozAlign" : "center" ,
83+ },
7984 {
8085 "title" : "Last Heard" ,
8186 "field" : "time" ,
@@ -101,11 +106,9 @@ async def websocket_handler(self, request: BaseRequest):
101106 ],
102107 }
103108 ]
104- # Put ANNOUNCE TDF first, if it exists
105- if "ANNOUNCE" in self ._columns :
106- sorted_tdfs = ["ANNOUNCE" ] + [v for v in sorted (self ._columns ) if v != "ANNOUNCE" ]
107- else :
108- sorted_tdfs = sorted (self ._columns )
109+ # Put the announce TDFs first for clarity
110+ priorities = {"ANNOUNCE_V2" : 0 , "ANNOUNCE" : 1 }
111+ sorted_tdfs = sorted (self ._columns , key = lambda x : priorities .get (x , 2 ))
109112
110113 for tdf_name in sorted_tdfs :
111114 columns .append (
@@ -190,9 +193,8 @@ def recv_thread(self) -> None:
190193 if source .infuse_id not in self ._data :
191194 self ._data [source .infuse_id ] = {
192195 "infuse_id" : f"0x{ source .infuse_id :016x} " ,
196+ "application" : "Unknown" ,
193197 }
194- # Set default application ID
195- self ._data [source .infuse_id ]["ANNOUNCE" ] = {"application" : "Unknown" }
196198
197199 self ._data [source .infuse_id ]["time" ] = InfuseTime .utc_time_string (time .time ())
198200 if source .interface == interface .ID .BT_ADV :
@@ -207,6 +209,8 @@ def recv_thread(self) -> None:
207209 self ._columns [t .NAME ] = self .tdf_columns (t )
208210 if t .NAME not in self ._data [source .infuse_id ]:
209211 self ._data [source .infuse_id ][t .NAME ] = {}
212+ if t .NAME in ["ANNOUNCE" , "ANNOUNCE_V2" ]:
213+ self ._data [source .infuse_id ]["application" ] = f"0x{ t .application :08x} "
210214
211215 for field in t .iter_fields (nested_iter = False ):
212216 if isinstance (field .val , structs .tdf_struct_mcuboot_img_sem_ver ):
0 commit comments