@@ -3219,12 +3219,7 @@ while(!wanteventflag)
32193219 }
32203220 if ((lifetime % 10 ) == 0 )
32213221 {
3222- if (gpiostatusled > 0 )
3223- {
3224- GPIO_SET = 1 << gpiostatusled ;
3225- nanosleep (& sleepled , NULL );
3226- GPIO_CLR = 1 << gpiostatusled ;
3227- }
3222+ if (gpiostatusled > 0 ) GPIO_SET = 1 << gpiostatusled ;
32283223 if (gpiobutton > 0 )
32293224 {
32303225 if (GET_GPIO (gpiobutton ) > 0 )
@@ -3235,6 +3230,10 @@ while(!wanteventflag)
32353230 }
32363231 if (errortxcount > errorcountmax ) wanteventflag |= EXIT_ON_ERROR ;
32373232 }
3233+ else if ((lifetime % 10 ) == 1 )
3234+ {
3235+ if (gpiostatusled > 0 ) GPIO_CLR = 1 << gpiostatusled ;
3236+ }
32383237 if ((tottime > 0 ) && (lifetime >= tottime )) wanteventflag |= EXIT_ON_TOT ;
32393238 if ((lifetime % timewatchdog ) == 0 )
32403239 {
@@ -3320,12 +3319,7 @@ while(!wanteventflag)
33203319 }
33213320 if ((lifetime % 10 ) == 0 )
33223321 {
3323- if (gpiostatusled > 0 )
3324- {
3325- GPIO_SET = 1 << gpiostatusled ;
3326- nanosleep (& sleepled , NULL );
3327- GPIO_CLR = 1 << gpiostatusled ;
3328- }
3322+ if (gpiostatusled > 0 ) GPIO_SET = 1 << gpiostatusled ;
33293323 if (gpiobutton > 0 )
33303324 {
33313325 if (GET_GPIO (gpiobutton ) > 0 )
@@ -3336,6 +3330,10 @@ while(!wanteventflag)
33363330 }
33373331 if (errortxcount > errorcountmax ) wanteventflag |= EXIT_ON_ERROR ;
33383332 }
3333+ else if ((lifetime % 10 ) == 1 )
3334+ {
3335+ if (gpiostatusled > 0 ) GPIO_CLR = 1 << gpiostatusled ;
3336+ }
33393337 if ((tottime > 0 ) && (lifetime >= tottime )) wanteventflag |= EXIT_ON_TOT ;
33403338 if ((lifetime % timewatchdog ) == 0 )
33413339 {
@@ -3408,12 +3406,7 @@ while(!wanteventflag)
34083406 }
34093407 if ((lifetime % 10 ) == 0 )
34103408 {
3411- if (gpiostatusled > 0 )
3412- {
3413- GPIO_SET = 1 << gpiostatusled ;
3414- nanosleep (& sleepled , NULL );
3415- GPIO_CLR = 1 << gpiostatusled ;
3416- }
3409+ if (gpiostatusled > 0 ) GPIO_SET = 1 << gpiostatusled ;
34173410 if (gpiobutton > 0 )
34183411 {
34193412 if (GET_GPIO (gpiobutton ) > 0 )
@@ -3424,6 +3417,10 @@ while(!wanteventflag)
34243417 }
34253418 if (errortxcount > errorcountmax ) wanteventflag |= EXIT_ON_ERROR ;
34263419 }
3420+ else if ((lifetime % 10 ) == 1 )
3421+ {
3422+ if (gpiostatusled > 0 ) GPIO_CLR = 1 << gpiostatusled ;
3423+ }
34273424 if ((tottime > 0 ) && (lifetime >= tottime )) wanteventflag |= EXIT_ON_TOT ;
34283425 if ((lifetime % timewatchdog ) == 0 )
34293426 {
@@ -3512,12 +3509,7 @@ while(!wanteventflag)
35123509 }
35133510 if ((lifetime % 10 ) == 0 )
35143511 {
3515- if (gpiostatusled > 0 )
3516- {
3517- GPIO_SET = 1 << gpiostatusled ;
3518- nanosleep (& sleepled , NULL );
3519- GPIO_CLR = 1 << gpiostatusled ;
3520- }
3512+ if (gpiostatusled > 0 ) GPIO_SET = 1 << gpiostatusled ;
35213513 if (gpiobutton > 0 )
35223514 {
35233515 if (GET_GPIO (gpiobutton ) > 0 )
@@ -3528,6 +3520,10 @@ while(!wanteventflag)
35283520 }
35293521 if (errortxcount > errorcountmax ) wanteventflag |= EXIT_ON_ERROR ;
35303522 }
3523+ else if ((lifetime % 10 ) == 1 )
3524+ {
3525+ if (gpiostatusled > 0 ) GPIO_CLR = 1 << gpiostatusled ;
3526+ }
35313527 if ((tottime > 0 ) && (lifetime >= tottime )) wanteventflag |= EXIT_ON_TOT ;
35323528 if ((lifetime % timewatchdog ) == 0 )
35333529 {
0 commit comments