|
|
|
@ -349,7 +349,6 @@ void PublisherApp::run()
|
|
|
|
float stable_weight1 = 0;
|
|
|
|
float stable_weight1 = 0;
|
|
|
|
float stable_weight2 = 0;
|
|
|
|
float stable_weight2 = 0;
|
|
|
|
int weigh_state = WEIGH_IDLE;
|
|
|
|
int weigh_state = WEIGH_IDLE;
|
|
|
|
int weigh_timeout = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (!is_stopped())
|
|
|
|
while (!is_stopped())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -510,7 +509,6 @@ void PublisherApp::run()
|
|
|
|
DEBUG("license_no " << license_no);
|
|
|
|
DEBUG("license_no " << license_no);
|
|
|
|
stable_weight1 = stable_weight;
|
|
|
|
stable_weight1 = stable_weight;
|
|
|
|
weigh_state = WEIGH_STABLE1;
|
|
|
|
weigh_state = WEIGH_STABLE1;
|
|
|
|
weigh_timeout = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case WEIGH_STABLE1:
|
|
|
|
case WEIGH_STABLE1:
|
|
|
|
@ -519,13 +517,6 @@ void PublisherApp::run()
|
|
|
|
DEBUG("weigh1 clear");
|
|
|
|
DEBUG("weigh1 clear");
|
|
|
|
weigh_state = WEIGH_STABLE2;
|
|
|
|
weigh_state = WEIGH_STABLE2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (weigh_timeout++ > 600)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DEBUG("weigh1 clear timeout");
|
|
|
|
|
|
|
|
weigh_timeout = 0;
|
|
|
|
|
|
|
|
stable_weight2 = stable_weight;
|
|
|
|
|
|
|
|
weigh_state = WEIGH_SEND;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case WEIGH_STABLE2:
|
|
|
|
case WEIGH_STABLE2:
|
|
|
|
if ((stable_weight != 0) && (license_no.empty() != true))
|
|
|
|
if ((stable_weight != 0) && (license_no.empty() != true))
|
|
|
|
@ -542,7 +533,6 @@ void PublisherApp::run()
|
|
|
|
DEBUG("stable_weight2 error");
|
|
|
|
DEBUG("stable_weight2 error");
|
|
|
|
stable_weight1 = stable_weight;
|
|
|
|
stable_weight1 = stable_weight;
|
|
|
|
weigh_state = WEIGH_STABLE1;
|
|
|
|
weigh_state = WEIGH_STABLE1;
|
|
|
|
weigh_timeout = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|