mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 18:38:10 +00:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			v4.1.0-rc2
			...
			14493
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | e7cd5038ac | ||
|   | 34e4a01e25 | ||
|   | 60e9fb2645 | 
| @@ -200,7 +200,7 @@ | ||||
| 			phy-mode = "sgmii"; | ||||
| 			full-duplex; | ||||
| 			pause; | ||||
| 			airoha,surge = <1>; | ||||
| 			airoha,surge = <0>; | ||||
| 			airoha,polarity = <2>; | ||||
| 		}; | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,7 @@ import * as fs from 'fs'; | ||||
|  | ||||
| let cmd = ARGV[0]; | ||||
| let ifname = getenv("interface"); | ||||
| let opt224 = getenv("opt138"); | ||||
| let opt138 = getenv("opt138"); | ||||
| let opt224 = getenv("opt224"); | ||||
|  | ||||
| if (cmd != 'bound' && cmd != 'renew') | ||||
|   | ||||
| @@ -20,6 +20,7 @@ let config; | ||||
| let offline_timer; | ||||
| let current_state; | ||||
| let online = false; | ||||
| let leds_off = false; | ||||
|  | ||||
| function self_healing() { | ||||
| 	let heal_wifi = false; | ||||
| @@ -148,6 +149,13 @@ function online_handler() { | ||||
|  | ||||
| function config_load() { | ||||
| 	ulog(LOG_INFO, 'loading config\n'); | ||||
|  | ||||
| 	uci.load('system'); | ||||
| 	let led_off_cfg = uci.get("system", "@system[0]", "leds_off"); | ||||
| 	if (led_off_cfg == 1) { | ||||
| 		leds_off = true; | ||||
| 	} | ||||
|  | ||||
| 	uci.load('state'); | ||||
| 	config = uci.get_all('state'); | ||||
|  | ||||
| @@ -191,7 +199,7 @@ function led_find(alias) { | ||||
| function factory_reset_timeout() { | ||||
| 	let led = led_find('led-running'); | ||||
| 	if (led) | ||||
| 		led_write(led, 'trigger', 'default-on'); | ||||
| 		led_write(led, 'trigger', leds-off ? 'none' : 'default-on'); | ||||
| } | ||||
|  | ||||
| let blink_timer; | ||||
| @@ -210,7 +218,7 @@ let state_handler = { | ||||
| 	offline: function() { | ||||
| 		online = false; | ||||
| 		let led = led_find('led-running'); | ||||
| 		if (led) | ||||
| 		if (!leds_off && led) | ||||
| 			led_write(led, 'trigger', 'heartbeat'); | ||||
| 		if (config.ui.offline_trigger) { | ||||
| 			if (offline_timer) | ||||
| @@ -223,7 +231,7 @@ let state_handler = { | ||||
| 	online: function() { | ||||
| 		online = true; | ||||
| 		let led = led_find('led-running'); | ||||
| 		if (led) | ||||
| 		if (!leds_off && led) | ||||
| 			led_write(led, 'trigger', 'default-on'); | ||||
| 		online_handler(); | ||||
| 		return 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user