From: Stefan Bader Date: Mon, 12 Oct 2015 18:46:22 +0000 (+0200) Subject: Correctly calculate Wireless link quality X-Git-Tag: 2.10~6^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9e6e0d4f8f006a4aa897cb98868c22515d80ea1c;p=i3%2Fi3status Correctly calculate Wireless link quality Wireless quality was stuck at 100% due to a signed with unsigned integer division. --- diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c index a3ab670..aff0438 100644 --- a/src/print_wireless_info.c +++ b/src/print_wireless_info.c @@ -104,7 +104,7 @@ static void print_bitrate(char *buffer, int buflen, int bitrate) { } // Based on NetworkManager/src/platform/wifi/wifi-utils-nl80211.c -static uint32_t nl80211_xbm_to_percent(int32_t xbm, uint32_t divisor) { +static uint32_t nl80211_xbm_to_percent(int32_t xbm, int32_t divisor) { #define NOISE_FLOOR_DBM -90 #define SIGNAL_MAX_DBM -20