net gadget: fix 2 obvious cnp errors

note that the max/percent calculation are still wrong.
Seems the first cur calc give a huge value, that go into max and prevent any other perc calc to be correct.
This commit is contained in:
Davide Andreoli 2017-01-15 15:57:40 +01:00
parent cd3490f35c
commit f14124583f
1 changed files with 4 additions and 4 deletions

View File

@ -37,10 +37,10 @@ _netstatus_face_update(Instance *inst)
msg->val[0] = inst->cfg->netstatus.incurrent;
msg->val[1] = inst->cfg->netstatus.inpercent;
msg->val[2] = inst->cfg->netstatus.inmax;
msg->val[0] = inst->cfg->netstatus.outcurrent;
msg->val[1] = inst->cfg->netstatus.outpercent;
msg->val[2] = inst->cfg->netstatus.outmax;
edje_object_message_send(elm_layout_edje_get(inst->cfg->memusage.o_gadget),
msg->val[3] = inst->cfg->netstatus.outcurrent;
msg->val[4] = inst->cfg->netstatus.outpercent;
msg->val[5] = inst->cfg->netstatus.outmax;
edje_object_message_send(elm_layout_edje_get(inst->cfg->netstatus.o_gadget),
EDJE_MESSAGE_INT_SET, 1, msg);
free(msg);
}