slight config improvemnts

This commit is contained in:
Artem30801
2019-12-04 00:11:11 +03:00
parent a39970deca
commit fb8f81450a
3 changed files with 13 additions and 5 deletions

View File

@@ -1,5 +1,8 @@
# This is generated config_attrs with defaults
# Modify to configure
config_name = Copter config
config_version = 0.0
[SERVER]
port = 25000
host = 192.168.1.101
@@ -12,8 +15,11 @@ port = 8181
[NTP]
use = False
host = ntp1.stratum2.ru
port = 123n
port = 123
[PRIVATE]
# avialiable options: /hostname ; /default ; /ip ; any string 63 characters lengh
#id = /hostname
# avialiable options: /hostname ; /spec_default ; /ip ; any string 63 characters lengh
id = /hostname
# Drone's individual offset
# __list__ X Y Z
offset = 0.0, 0.0, 0.0

View File

@@ -18,6 +18,6 @@ port = integer(default=123)
[PRIVATE]
# avialiable options: /hostname ; /spec_default ; /ip ; any string 63 characters lengh
id = string(default=/hostname, max=63)
# Drone's individual offset
# Drone's individual offset (X, Y, Z)
# __list__ X Y Z
offset = float_list(default=list(0, 0, 0), min=3, max=3)

View File

@@ -193,7 +193,9 @@ if __name__ == '__main__':
# print(cfg.unchanged_defaults)
# print(11111)
print(cfg.full_dict)
import pprint
pprint.pprint(cfg.full_dict)
#print(cfg.full_dict)
#cfg.load_from_dict(cfg.full_dict, 'Drone/config/client.ini')
#print(cfg.config.initial_comment, cfg.config.final_comment)