|
|
@@ -132,7 +132,7 @@ static int8_t check_segCode_first(uint8_t segcode[], Usrc7SegDa *seg, uint8_t *e
|
|
|
case 0x80:// 只有点的情况,不算是错误码,直接转成空即不显示
|
|
|
seg->val[i] = 0x00;
|
|
|
break;
|
|
|
- case 0x72: case 0x38: case 0xF2: case 0xB8: // 去掉P和L的情况
|
|
|
+ case 0x73: case 0x38: case 0xF3: case 0xB8: // 去掉P和L的情况
|
|
|
*error = 1;
|
|
|
da = -1;
|
|
|
bpl = 0x01;
|
|
|
@@ -150,9 +150,12 @@ static int8_t check_segCode_first(uint8_t segcode[], Usrc7SegDa *seg, uint8_t *e
|
|
|
}
|
|
|
//printf("\n");
|
|
|
|
|
|
- if(bpl == 0x01) goto ERROR_END;
|
|
|
-
|
|
|
- if(da == 0x00){ // 考虑去掉P和L的情况
|
|
|
+ if(bpl == 0x01){// 说明已经是PL,
|
|
|
+ da = -1;
|
|
|
+ printf("显示为___P\n");
|
|
|
+ goto ERROR_END;
|
|
|
+ }
|
|
|
+ else if(da == 0x00){ // 考虑去掉P和L的情况
|
|
|
if (sum == 0) da = -1;
|
|
|
else da = 1;
|
|
|
}
|
|
|
@@ -181,7 +184,7 @@ ERROR_END:
|
|
|
}
|
|
|
}
|
|
|
else if(g_logMsg.logType == LOG_TYPE_NULL){
|
|
|
- if(timeout_isOut(&g_xspErrDa.timer) && flag == 1){
|
|
|
+ if(timeout_isOut(&g_xspErrDa.timer) && (flag == 1)){
|
|
|
for(i=0;i<16;i++){
|
|
|
if(g_xspErrDa.lastsegDa[i] != g_xspErrDa.segDa[i]) {
|
|
|
memcpy(g_xspErrDa.lastsegDa,g_xspErrDa.segDa,16);
|
|
|
@@ -555,6 +558,7 @@ void save_record_to_flash(uint8_t recordMode)
|
|
|
// }
|
|
|
|
|
|
g_xspCollDa.lastbSaveRecord = 0;
|
|
|
+ if(g_xspCollDa.curDisp.price > 5000) return; // 单价大于
|
|
|
if((recordMode == 0x01) &&(g_xspCollDa.bcheckDa == 0) ){//
|
|
|
|
|
|
if((g_xspCollDa.curDisp.amount == 888888) || (g_xspCollDa.curDisp.oil == 888888)) return;
|
|
|
@@ -572,7 +576,7 @@ void save_record_to_flash(uint8_t recordMode)
|
|
|
{
|
|
|
if((g_xspCollDa.lastDisp.amount == 888888) || (g_xspCollDa.lastDisp.oil == 888888)) return;
|
|
|
if((g_xspCollDa.lastDisp.amount == 0) || (g_xspCollDa.lastDisp.oil == 0)) return ;
|
|
|
- if(g_xspCollDa.lastDisp.amount == g_xspCollDa.lastDisp.oil) return;
|
|
|
+ //if(g_xspCollDa.lastDisp.amount == g_xspCollDa.lastDisp.oil) return; // 油量 和金额相同的
|
|
|
if(g_xspCollDa.lastDisp.amount >=999999 || g_xspCollDa.lastDisp.oil>=999999) return;
|
|
|
amount = g_xspCollDa.curDisp.amount - g_xspCollDa.lastDisp.amount;
|
|
|
if((g_xspCollDa.curDisp.amount!=0) &&(amount>0) && (amount <50)){ // 和当前的值校正一下
|
|
|
@@ -821,7 +825,9 @@ void analysis_7seg_code(uint8_t _7egDa[])
|
|
|
g_xspCollDa.startToprog++;
|
|
|
g_xspCollDa.lastTick = Get_SysTick();
|
|
|
}
|
|
|
- if((g_xspCollDa.startToprog > 5)||(g_xspCollDa.gunStatus==GUN_UP)){//||(g_gunStatus[0].curst==HIGHT_LOW)||(g_gunStatus[0].curst == LOW_LEVEL)
|
|
|
+ else g_xspCollDa.startToprog = 0;
|
|
|
+
|
|
|
+ if((g_xspCollDa.startToprog > 5)){//||((g_xspCollDa.gunStatus==GUN_UP)) //||(g_gunStatus[0].curst==HIGHT_LOW)||(g_gunStatus[0].curst == LOW_LEVEL)
|
|
|
g_xspCollDa.curstatus = STATUS_PROG; // 加油过程
|
|
|
memcpy(&g_xspCollDa.lastDisp, &temp, sizeof(dispData));
|
|
|
}
|
|
|
@@ -830,21 +836,21 @@ void analysis_7seg_code(uint8_t _7egDa[])
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
- if((temp.amount==0x00)&&(temp.oil==0x00)){
|
|
|
- //printf("ccccccccccccccccccc\n");
|
|
|
- if(g_xspCollDa.lastbSaveRecord == 0x01) {// 判断是否需要存储记录
|
|
|
- save_record_to_flash(0x00);
|
|
|
- printf("xsp change 01 save\n");
|
|