projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB spec limits bulk endpoints to 64 byte payload max.
[fw/altos]
/
ao_convert.c
diff --git
a/ao_convert.c
b/ao_convert.c
index 08f628b46be7a6161d19a05813521f87b0525e3a..57ed73701abefe29d99d888ddbe35b4a586b982a 100644
(file)
--- a/
ao_convert.c
+++ b/
ao_convert.c
@@
-30,6
+30,17
@@
ao_pres_to_altitude(int16_t pres) __reentrant
return altitude_table[pres];
}
return altitude_table[pres];
}
+int16_t
+ao_altitude_to_pres(int16_t alt) __reentrant
+{
+ int16_t pres;
+
+ for (pres = 0; pres < 2047; pres++)
+ if (altitude_table[pres] <= alt)
+ break;
+ return pres << 4;
+}
+
static __xdata uint8_t ao_temp_mutex;
int16_t
static __xdata uint8_t ao_temp_mutex;
int16_t
@@
-42,6
+53,3
@@
ao_temp_to_dC(int16_t temp) __reentrant
ao_mutex_put(&ao_temp_mutex);
return ret;
}
ao_mutex_put(&ao_temp_mutex);
return ret;
}
-
-int16_t
-ao_accel_to_cm_per_s2(int16_t accel) __reentrant;