@@ -59,9 +59,9 @@ def Codeplug_to_gb3gf_opengd77_csv(cp, output_dir):
5959 "Timeslot" ,
6060 "Contact" ,
6161 "TG List" ,
62- "DMR ID" , # New entry
63- "TS1_TA_Tx" , # New entry
64- "TS2_TA_Tx ID" , # New entry
62+ "DMR ID" ,
63+ "TS1_TA_Tx" ,
64+ "TS2_TA_Tx ID" ,
6565 "RX Tone" ,
6666 "TX Tone" ,
6767 "Squelch" ,
@@ -71,15 +71,15 @@ def Codeplug_to_gb3gf_opengd77_csv(cp, output_dir):
7171 "All Skip" ,
7272 "TOT" ,
7373 "VOX" ,
74- "No Beep" , # New entry
75- "No Eco" , # New entry
76- "APRS" , # New entry
77- "Latitude" , # New entry
78- "Longitude" , # New entry
79- "Use Location" # New entry
74+ "No Beep" ,
75+ "No Eco" ,
76+ "APRS" ,
77+ "Latitude" ,
78+ "Longitude" ,
79+ "Use Location"
8080 ]
8181 with open ("{}/Channels.csv" .format (output_dir ), "w" , newline = "" ) as f :
82- csvw = csv .DictWriter (f , channel_fields , delimiter = "; " )
82+ csvw = csv .DictWriter (f , channel_fields , delimiter = ", " )
8383 csvw .writeheader ()
8484 for ix , channel in enumerate (cp .channels ):
8585 if isinstance (channel , AnalogChannel ):
@@ -124,15 +124,15 @@ def Codeplug_to_gb3gf_opengd77_csv(cp, output_dir):
124124 "No Beep" : "Yes" ,
125125 "No Eco" : "No" ,
126126 "APRS" : "None" ,
127- "Latitude" : "None" ,
128- "Longitude" : "None" ,
127+ "Latitude" : channel . latitude ,
128+ "Longitude" : channel . longitude ,
129129 "Use Location" : "Yes"
130130 }
131131 )
132132 csvw .writerow (d )
133133 tg_fields = ["TG List Name" ] + ["Contact {}" .format (x ) for x in range (1 , 33 )]
134134 with open ("{}/TG_Lists.csv" .format (output_dir ), "w" , newline = "" ) as f :
135- csvw = csv .DictWriter (f , tg_fields , delimiter = "; " )
135+ csvw = csv .DictWriter (f , tg_fields , delimiter = ", " )
136136 csvw .writeheader ()
137137 n_grouplists = len (cp .grouplists )
138138 for gl in cp .grouplists :
@@ -154,7 +154,7 @@ def Codeplug_to_gb3gf_opengd77_csv(cp, output_dir):
154154 csvw .writerow (tg_list )
155155 zone_fields = ["Zone Name" ] + ["Channel {}" .format (x ) for x in range (1 , 81 )]
156156 with open ("{}/Zones.csv" .format (output_dir ), "w" , newline = "" ) as f :
157- csvw = csv .DictWriter (f , zone_fields , delimiter = "; " )
157+ csvw = csv .DictWriter (f , zone_fields , delimiter = ", " )
158158 csvw .writeheader ()
159159 zone_names = [z .name for z in cp .zones ]
160160 # OpenGD77 doesn't have scanlist, so simulate it with separate zones
@@ -170,7 +170,7 @@ def Codeplug_to_gb3gf_opengd77_csv(cp, output_dir):
170170 csvw .writerow (row )
171171 with open ("{}/Contacts.csv" .format (output_dir ), "w" , newline = "" ) as f :
172172 csvw = csv .DictWriter (
173- f , ["Contact Name" , "ID" , "ID Type" , "TS Override" ], delimiter = "; "
173+ f , ["Contact Name" , "ID" , "ID Type" , "TS Override" ], delimiter = ", "
174174 )
175175 csvw .writeheader ()
176176 for tg in sorted (contacts , key = lambda c : c .name_with_timeslot ):
0 commit comments