From 75e1dcd9cfa2448172373b7908ce446a2bfae0c2 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sat, 4 Jan 2014 10:15:01 -0800 Subject: [PATCH] Don't update MAX2837 freq_cache unless set_freq() is successful. --- firmware/common/tuning.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/firmware/common/tuning.c b/firmware/common/tuning.c index aefeafc4..66a01d76 100644 --- a/firmware/common/tuning.c +++ b/firmware/common/tuning.c @@ -110,7 +110,9 @@ bool set_freq(const uint64_t freq) success = false; } max2837_set_mode(prior_max2837_mode); - freq_cache = freq; + if( success ) { + freq_cache = freq; + } return success; }