mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
support different server ports
This commit is contained in:
parent
2b21aab26b
commit
90790bd8e0
4 changed files with 14 additions and 1 deletions
|
@ -126,6 +126,7 @@ function testHamlib() {
|
|||
max="65534"
|
||||
min="1025"
|
||||
v-model="settings.local.port"
|
||||
@change="onChange"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -137,6 +138,7 @@ function testHamlib() {
|
|||
placeholder="modem host (default 127.0.0.1)"
|
||||
id="modem_port"
|
||||
v-model="settings.local.host"
|
||||
@change="onChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[NETWORK]
|
||||
modemaddress = 127.0.0.1
|
||||
modemport = 5000
|
||||
|
||||
[STATION]
|
||||
|
|
|
@ -10,6 +10,7 @@ class CONFIG:
|
|||
|
||||
config_types = {
|
||||
'NETWORK': {
|
||||
'modemaddress': str,
|
||||
'modemport': int,
|
||||
},
|
||||
'STATION': {
|
||||
|
|
|
@ -344,4 +344,13 @@ if __name__ == "__main__":
|
|||
# initialize database default values
|
||||
DatabaseManager(app.event_manager).initialize_default_values()
|
||||
wsm.startThreads(app)
|
||||
app.run()
|
||||
|
||||
conf = app.config_manager.read()
|
||||
modemaddress = conf['NETWORK']['modemaddress']
|
||||
modemport = conf['NETWORK']['modemport']
|
||||
|
||||
if not modemaddress:
|
||||
modemaddress = '127.0.0.1'
|
||||
if not modemport:
|
||||
modemport = 5000
|
||||
app.run(modemaddress, modemport)
|
||||
|
|
Loading…
Reference in a new issue