add NO_MAP option

This commit is contained in:
KF7EEL 2021-08-08 14:17:13 -07:00
parent e72682800a
commit c414edab99
4 changed files with 30 additions and 3 deletions

View File

@ -238,7 +238,7 @@ def download_config(L_CONFIG_FILE, cli_file):
corrected_config['SYSTEMS'][i]['URL'] = bytes((iterate_config[i]['URL']).ljust(124)[:124], 'utf-8')
corrected_config['SYSTEMS'][i]['SOFTWARE_ID'] = bytes(('HBNet V1.0').ljust(40)[:40], 'utf-8')
corrected_config['SYSTEMS'][i]['PACKAGE_ID'] = bytes(('Dev').ljust(40)[:40], 'utf-8')
corrected_config['SYSTEMS'][i]['OPTIONS'] = b''.join([b'Type=HBlink;', bytes(iterate_config[i]['OPTIONS'], 'utf-8')])
corrected_config['SYSTEMS'][i]['OPTIONS'] = b''.join([b'Type=HBNet;', bytes(iterate_config[i]['OPTIONS'], 'utf-8')])

View File

@ -702,6 +702,9 @@ class HBSYSTEM(DatagramProtocol):
and self._peers[_peer_id]['CONNECTION'] == 'YES' \
and self._peers[_peer_id]['SOCKADDR'] == _sockaddr:
logger.info('(%s) Peer %s (%s) has send options: %s', self._system, self._peers[_peer_id]['CALLSIGN'], int_id(_peer_id), _data[8:])
# Send remove from map command
if 'NO_MAP' in str(_data[8:]):
self.send_peer_loc(_peer_id, self._peers[_peer_id]['CALLSIGN'], '*', '*', '*', '*', '*', '*')
self.transport.write(b''.join([RPTACK, _peer_id]), _sockaddr)
elif _command == DMRA:

View File

@ -5690,7 +5690,10 @@ TG #: <strong> ''' + str(tg_d.tg) + '''</strong>
burn_list=get_burnlist()
)
elif 'loc_callsign' in hblink_req:
peer_locations[hblink_req['dmr_id']] = [hblink_req['loc_callsign'], hblink_req['lat'], hblink_req['lon'], hblink_req['url'], hblink_req['description'], hblink_req['loc'], hblink_req['software']]
if hblink_req['lat'] == '*' and hblink_req['lon'] == '*':
del peer_locations[hblink_req['dmr_id']]
else:
peer_locations[hblink_req['dmr_id']] = [hblink_req['loc_callsign'], hblink_req['lat'], hblink_req['lon'], hblink_req['url'], hblink_req['description'], hblink_req['loc'], hblink_req['software']]
response = ''
elif 'get_config' in hblink_req:

View File

@ -12,5 +12,26 @@
<p>&nbsp;</p>
<h3 style="text-align: center;">Talkgroups</h3>
<p>You may view a list of all talkgroups by going to the <a href="talkgroups">Talkgroups</a> page. Click on the talkgroup name for more information. A CSV file is available for download and may be used in the CPS of some radios. Talkgroups listed there may not be available on all servers if there are multiple. You may find a list of talkgroups available on each server by going to the <a href="/generate_passphrase">Passphrase(s)</a> page.</p>
<p>&nbsp;</p>
<h3 style="text-align: center;">"Options"</h3>
<p>Options are like a type of command that your hotspot/repeater sends to the server for various functions. The following options are supported:</p>
<div class="container-fluid">
<table class="table table-striped">
<thead>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>NO_MAP</td>
<td>This option will prevent your hotspot/repeater from plotting on the map.</td>
</tr>
</tbody>
</table>
</div>
<p>You can add multiple options by separating them using a semicolon (<strong>;</strong>). <br />
Example: <pre>OPTION_1;OPTION_2</pre>
{% endblock %}