if( g_dev.state & CURR_SENSOR_ERR )
disp_str( (disp_item_t*)&lcd_curr, "Err", DISP_ON );
else if( curr < 400 && curr > -400 )
- disp_float_x10( (disp_item_t*)&lcd_curr, curr, DISP_ON );
+ disp_float_x10( (disp_item_t*)&lcd_curr, curr, DISP_ON );
else
disp_str( (disp_item_t*)&lcd_curr, "---", DISP_ON );
}
if( g_dev.state & FLOWMETER_ERR )
disp_str( (disp_item_t*)&lcd_flow, "Err", DISP_ON );
else
- disp_float_x10( (disp_item_t*)&lcd_flow, flow, DISP_ON );
+ disp_float_x10( (disp_item_t*)&lcd_flow, flow, DISP_ON );
}
void disp_pressure( float pressure )
if( g_dev.state & PRESSURE_SENSOR_ERR )
disp_str( (disp_item_t*)&lcd_pressure, "Err", DISP_ON );
else
- disp_float_x10( (disp_item_t*)&lcd_pressure, pressure, DISP_ON );
+ disp_float_x10( (disp_item_t*)&lcd_pressure, pressure, DISP_ON );
}
void disp_total( uint32_t total )
flow_rate_check();
}
}
-
+
//LED报警灯
- HAL_GPIO_WritePin( PB3_LEDG_GPIO_Port, PB3_LEDG_Pin, (now%1000)<500?GPIO_PIN_SET:GPIO_PIN_RESET );
if( g_dev.state == 0 ){
-
HAL_GPIO_WritePin( PB3_LEDG_GPIO_Port, PB3_LEDG_Pin, (now%1000)<500?GPIO_PIN_SET:GPIO_PIN_RESET );
HAL_GPIO_WritePin( PB3_LEDR_GPIO_Port, PB3_LEDR_Pin, GPIO_PIN_RESET );
}else{