projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e637367
)
altoslib: Round frequency when configuring radio
author
Keith Packard
<keithp@keithp.com>
Tue, 3 Mar 2015 05:06:51 +0000
(21:06 -0800)
committer
Keith Packard
<keithp@keithp.com>
Tue, 3 Mar 2015 05:06:51 +0000
(21:06 -0800)
This makes sure we set the right frequency, instead of being off by
1kHz on a regular basis...
Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosLink.java
patch
|
blob
|
history
diff --git
a/altoslib/AltosLink.java
b/altoslib/AltosLink.java
index 01c378645d23c52fe3bee3416be39b605de05383..0105398dbf8c718f6dca40b1a11087305ee42d01 100644
(file)
--- a/
altoslib/AltosLink.java
+++ b/
altoslib/AltosLink.java
@@
-354,7
+354,7
@@
public abstract class AltosLink implements Runnable {
if (frequency == 0)
return;
if (has_frequency)
- set_radio_freq((int) Math.floor (frequency * 1000));
+ set_radio_freq((int) Math.floor (frequency * 1000
+ 0.5
));
else if (has_setting)
set_radio_setting(AltosConvert.radio_frequency_to_setting(frequency, cal));
else