1.指示灯调整

This commit is contained in:
payton 2023-07-28 17:51:06 +08:00
parent 2cf462da0c
commit 69262c1a48

View File

@ -21,7 +21,7 @@
#include "sf_message_queue.h" #include "sf_message_queue.h"
#include "sf_hal_ttyusb.h" #include "sf_hal_ttyusb.h"
#include "sf_common.h" #include "sf_common.h"
#include "sf_device.h"
#ifdef __cplusplus #ifdef __cplusplus
#if __cplusplus #if __cplusplus
extern "C" { extern "C" {
@ -400,7 +400,7 @@ void* sf_led_thread(void *arg)
{ {
if(isUsbIn) if(isUsbIn)
{ {
if((SF_LED_BUSY == i)/* || (i == SF_LED_STATUS_G)*/) if((SF_LED_BUSY == i) || (SF_LED_STATUS_G == i))
{ {
sf_led_on(LedInfo[i].ledId); sf_led_on(LedInfo[i].ledId);
} }
@ -569,8 +569,9 @@ void sf_led_init(void)
{ {
static UINT8 dofirst = 1; static UINT8 dofirst = 1;
UINT8 startup = sf_poweron_type_get(); UINT8 startup = sf_poweron_type_get();
SINT32 isUpdate = sf_in_update();
//printf("[%s:%d] s\n", __FUNCTION__, __LINE__); //printf("[%s:%d] s\n", __FUNCTION__, __LINE__);
if((!dofirst) || ((SF_MCU_STARTUP_ONKEY != startup) && (SF_MCU_STARTUP_NORMAL != startup) && (SF_MCU_STARTUP_USB != startup))) if((!dofirst) || ((!isUpdate) && (SF_MCU_STARTUP_OFF != startup) &&(SF_MCU_STARTUP_ONKEY != startup) && (SF_MCU_STARTUP_NORMAL != startup) && (SF_MCU_STARTUP_USB != startup)))
return; return;
dofirst = 0; dofirst = 0;
@ -851,6 +852,7 @@ void sf_sys_status_led_set(LedSysState_t ledSysStateId)
sf_led_set(SF_LED_BUSY, SF_LED_STATE_ON); sf_led_set(SF_LED_BUSY, SF_LED_STATE_ON);
sf_led_set(SF_LED_STATUS_G, SF_LED_STATE_ON); sf_led_set(SF_LED_STATUS_G, SF_LED_STATE_ON);
isUsbIn = TRUE; isUsbIn = TRUE;
printf("[%s:%d] isUsbIn:%d\n", __FUNCTION__, __LINE__,isUsbIn);
break; break;
#endif #endif
//#if HW_S510 //#if HW_S510