mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-30 23:42:42 +01:00 
			
		
		
		
	Merge pull request #1334 from bd-g/master
Adjust max wifi strength that is possible
This commit is contained in:
		| @@ -789,8 +789,8 @@ void waybar::modules::Network::parseSignal(struct nlattr **bss) { | ||||
|     // signalstrength in dBm from mBm | ||||
|     signal_strength_dbm_ = nla_get_s32(bss[NL80211_BSS_SIGNAL_MBM]) / 100; | ||||
|  | ||||
|     // WiFi-hardware usually operates in the range -90 to -20dBm. | ||||
|     const int hardwareMax = -20; | ||||
|     // WiFi-hardware usually operates in the range -90 to -30dBm. | ||||
|     const int hardwareMax = -30; | ||||
|     const int hardwareMin = -90; | ||||
|     const int strength = | ||||
|       ((signal_strength_dbm_ - hardwareMin) / double{hardwareMax - hardwareMin}) * 100; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alex
					Alex