new led management (part 2)
This commit is contained in:
		
							parent
							
								
									758a960371
								
							
						
					
					
						commit
						bf6a21f44f
					
				@ -11,10 +11,10 @@
 | 
			
		||||
 | 
			
		||||
; ---> SELECT TARGET PLATFORM HERE! <---
 | 
			
		||||
[platformio]
 | 
			
		||||
env_default = heltec_wifi_lora_32
 | 
			
		||||
;env_default = heltec_wifi_lora_32
 | 
			
		||||
;env_default = ttgov1
 | 
			
		||||
;env_default = ttgov2
 | 
			
		||||
;env_default = lopy
 | 
			
		||||
env_default = lopy
 | 
			
		||||
;env_default = lopy4
 | 
			
		||||
;env_default = lolin32lite_lora
 | 
			
		||||
;env_default = lolin32_lora
 | 
			
		||||
 | 
			
		||||
@ -53,12 +53,12 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
 | 
			
		||||
    // Insert only if it was not found on global count
 | 
			
		||||
    if (added) {
 | 
			
		||||
        if (sniff_type == MAC_SNIFF_WIFI ) {
 | 
			
		||||
            set_LED(COLOR_GREEN, 20, 0, 1);
 | 
			
		||||
            set_LED(COLOR_GREEN, 50, 0, 1); 
 | 
			
		||||
            wifis.insert(hashedmac);   // add hashed MAC to wifi container
 | 
			
		||||
            }   
 | 
			
		||||
        #ifdef BLECOUNTER
 | 
			
		||||
        else if (sniff_type == MAC_SNIFF_BLE ) {
 | 
			
		||||
            set_LED(COLOR_MAGENTA, 20, 0, 1);
 | 
			
		||||
            set_LED(COLOR_MAGENTA, 50, 0, 1);
 | 
			
		||||
            bles.insert(hashedmac);    // add hashed MAC to BLE container
 | 
			
		||||
            }
 | 
			
		||||
        #endif
 | 
			
		||||
 | 
			
		||||
@ -424,7 +424,10 @@ uint64_t uptime() {
 | 
			
		||||
            #endif
 | 
			
		||||
 | 
			
		||||
            #ifdef HAS_RGB_LED
 | 
			
		||||
                rgb_set_color(color);
 | 
			
		||||
                if (LEDState)
 | 
			
		||||
                    rgb_set_color(color);       // LED on
 | 
			
		||||
                else
 | 
			
		||||
                    rgb_set_color(COLOR_NONE);  // LED off
 | 
			
		||||
            #endif
 | 
			
		||||
            previousLEDState = LEDState;
 | 
			
		||||
            LEDcount--;        // decrement blink counter
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user