mirror of
https://github.com/k3ng/k3ng_rotator_controller.git
synced 2025-01-18 18:56:36 +00:00
2.0.2015020702
OPTION_HH12_10_BIT_READINGS in hh12.h (thanks Johan PA3FPQ)
This commit is contained in:
parent
bccf5a741f
commit
cdad7efcc9
6
hh12.cpp
6
hh12.cpp
@ -9,6 +9,8 @@
|
||||
|
||||
Code adapted from here: http://www.madscientisthut.com/forum_php/viewtopic.php?f=11&t=7
|
||||
|
||||
Updated 2015-02-07 for 12 bit readings - Thanks Johan PA3FPQ
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@ -21,7 +23,11 @@ int inputstream = 0; //one bit read from pin
|
||||
long packeddata = 0; //two bytes concatenated from inputstream
|
||||
long angle = 0; //holds processed angle value
|
||||
float floatangle = 0;
|
||||
#ifdef OPTION_HH12_10_BIT_READINGS
|
||||
long anglemask = 65472; //0x1111111111000000: mask to obtain first 10 digits with position info
|
||||
#else
|
||||
long anglemask = 262080; // 0x111111111111000000: mask to obtain first 12 digits with position info
|
||||
#endif //OPTION_HH12_10_BIT_READINGS
|
||||
long statusmask = 63; //0x000000000111111; mask to obtain last 6 digits containing status info
|
||||
long statusbits; //holds status/error information
|
||||
int DECn; //bit holding decreasing magnet field error data
|
||||
|
1
hh12.h
1
hh12.h
@ -2,6 +2,7 @@
|
||||
#define hh12_h
|
||||
|
||||
#define HH12_DELAY 100 // microseconds
|
||||
//#define OPTION_HH12_10_BIT_READINGS
|
||||
|
||||
class hh12 {
|
||||
|
||||
|
@ -313,9 +313,11 @@
|
||||
OPTION_EL_PULSE_DEBOUNCE code - (thanks Gianfranco, IZ8EWD)
|
||||
#define EL_POSITION_PULSE_DEBOUNCE 500 // in ms
|
||||
|
||||
OPTION_HH12_10_BIT_READINGS in hh12.h (thanks Johan PA3FPQ)
|
||||
|
||||
*/
|
||||
|
||||
#define CODE_VERSION "2.0.2015011802"
|
||||
#define CODE_VERSION "2.0.2015020702"
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include <EEPROM.h>
|
||||
|
@ -131,6 +131,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Note:
|
||||
|
Loading…
Reference in New Issue
Block a user