From aced667f48c29a160aa4e5c0a8df037092b28189 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Mon, 18 Sep 2017 06:00:05 -0400 Subject: Undo hacks to meant to get around string formatting limitations The new vuprintf makes unnecessary workarounds due to formatting limitations. I checked grep output for whatever appeared to fit but it's possible I missed some instances because they weren't so obvious. Also, this means sound settings can dynamically work with any number of decimals rather than the current assumption of one or two. Add an ipow() function to help and take advantage of dynamic field width and precision. Consolidate string formatting of sound settings. Change-Id: I46caf534859dfd1916cd440cd25e5206b192fcd8 --- apps/misc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/misc.h') diff --git a/apps/misc.h b/apps/misc.h index 0d4cba6..b13c0b1 100644 --- a/apps/misc.h +++ b/apps/misc.h @@ -167,5 +167,7 @@ void push_current_activity(enum current_activity screen); void pop_current_activity(void); enum current_activity get_current_activity(void); +/* format a sound value like: -1.05 dB */ +int format_sound_value(char *buf, size_t len, int snd, int val); #endif /* MISC_H */ -- cgit v1.1