This commit is contained in:
Wolfgang Hottgenroth
2017-08-20 22:29:01 +02:00
commit 5281b6d075
24 changed files with 4257 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#!/usr/bin/python
from Cheetah.Template import Template
configItems = [
{"label":"_", "key":"magic", "type":"I"},
{"label":"Wifi SSID", "key":"wifiSsid", "type":"C", "length":32},
{"label":"Wifi Key", "key":"wifiKey", "type":"C", "length":64},
{"label":"MQTT Broker", "key":"mqttBroker", "type":"C", "length":64},
{"label":"MQTT Username", "key":"mqttUser", "type":"C", "length":32},
{"label":"MQTT Password", "key":"mqttPass", "type":"C", "length":32},
{"label":"MQTT ClientId", "key":"mqttClientId", "type":"C", "length":32},
{"label":"MQTT Topic", "key":"mqttTopic", "type":"C", "length":64},
{"label":"MQTT Port", "key":"mqttPort", "type":"I"},
{"label":"Measure Period", "key":"measurePeriod", "type":"I"}
]
h_file = Template(file="configuration_h.tmpl", searchList=[{"configItems":configItems}])
open('configuration.h','w').write(str(h_file))
c_file = Template(file="configuration_c.tmpl", searchList=[{"configItems":configItems}])
open('configuration.cpp','w').write(str(c_file))