Fix vtx_freq default value when USE_VTX_TABLES is defined
commitf543daa8baf158b4c91c3e44ea1c1c8ec8a861bb
authorBruce Luckcuck <github@etracer.net>
Thu, 1 Aug 2019 01:23:18 +0000 (31 21:23 -0400)
committerBruce Luckcuck <github@etracer.net>
Thu, 1 Aug 2019 01:23:18 +0000 (31 21:23 -0400)
treeb743e4c896a324c5d5c9e566d543cff3362928de
parent924c40a50d23d7c2b8205ec55c0715fe3e8758c3
Fix vtx_freq default value when USE_VTX_TABLES is defined
When a `vtxDevice` was active (like if `USE_VTX_RTC6705` is defined for the target) then the initialization logic would try to look up the frequency based on the band/channel and update the `vtx_freq` setting. The problem is that initially the `vtxtable` is not defined so the frequency lookup fails and returns 0. This resulted in a defaults difference since the default value was 5740 which would have matched the default band and channel if the "standard" bands/channels were set up with `vtxtable`. So instead set the default value to 0 unless legacy built-in frequencies are used (`USE_VTX_TABLES` not defined).
src/main/io/vtx.c