adjust digits

master
ademant 2019-08-05 05:28:31 +02:00
parent eec55361d9
commit 6c63ebb278
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ cf.close()
channel_names=[]
channel_info={}
parameter={"device":socket.gethostname(),"mean_count":5,"ring_length":10,"wait":0.5,"sigma":2,"cycle":10,"check_last":2,"gpg_keyid":""}
parameter={"device":socket.gethostname(),"mean_count":5,"ring_length":10,"wait":0.5,"sigma":2,"cycle":10,"check_last":5,"gpg_keyid":""}
for n in parameter:
if n in log_conf:
parameter[n]=log_conf[n]

View File

@ -15,7 +15,7 @@ cf.close()
channel_names=[]
channel_info={}
parameter={"device":socket.gethostname(),"mean_count":5,"ring_length":10,"check_last":5,"wait":0.5,"sigma":2,"cycle":10,"gpg_keyid":""}
parameter={"device":socket.gethostname(),"mean_count":5,"ring_length":10,"check_last":5,"wait":0.5,"sigma":2,"cycle":10,"gpg_keyid":"","digits":3}
for n in parameter:
if n in log_conf:
parameter[n]=log_conf[n]
@ -78,7 +78,7 @@ if "tristar" in log_conf:
sensor={"volt_scale":"tristar","amp_scale":"tristar","volt_bat":"tristar_battery","volt_bat_sens":"tristar_sense","volt_arr":"tristar_array","amp_bat":"tristar_battery","amp_arr":"tristar_array","temp_heatsink":"tristar","temp_bat":"tristar_battery","ah_res":"tristar_battery","ah_tot":"tristar","kwh_res":"tristar_battery","kwh_tot":"tristar","watt_in":"tristar_array","watt_out":"tristar_battery","hour_tot":"tristar","state":"tristar","volt_sweep_mp":"tristar_array","volt_sweep_oc":"tristar_array"}
i2c={"volt_scale":0,"amp_scale":0,"volt_bat":0,"volt_bat_sens":0,"volt_arr":0,"amp_bat":0,"amp_arr":0,"temp_heatsink":0,"temp_bat":0,"ah_res":0,"ah_tot":0,"kwh_res":0,"kwh_tot":0,"watt_in":0,"watt_out":0,"hour_tot":0,"state":0,"volt_sweep_mp":1,"volt_sweep_oc":2}
for i in ["volt_scale","amp_scale","volt_bat","volt_bat_sens","volt_arr","amp_bat","amp_arr","temp_heatsink","temp_bat","ah_res","ah_tot","kwh_res","kwh_tot","watt_in","watt_out","hour_tot","state","volt_sweep_mp","volt_sweep_oc"]:
channel_info[i]={"meas_data": meas_data(var_name=i,mean_count=parameter['cycle'],store_each_cycle=True,ring_length=parameter['ring_length'],device=parameter['device'],sensor="tristar",i2c=0,store_file="/home/pi/log/data_ve",sigma=tsl_sigma,digits=4,multiplicator=1000,check_last=check_last)}
channel_info[i]={"meas_data": meas_data(var_name=i,mean_count=parameter['cycle'],store_each_cycle=True,ring_length=parameter['ring_length'],device=parameter['device'],sensor="tristar",i2c=0,store_file="/home/pi/log/data_ve",sigma=tsl_sigma,digits=parameter['digits'],multiplicator=1000,check_last=check_last)}
if bmqtt and ("mqtt" in log_conf['ads1x15']):
channel_info[i]['meas_data'].set_mqtt(broker=mbroker,port=mport)
if "sqlserver" in log_conf: