Center sin/cos encoder amplitude limit around 1

This commit is contained in:
Benjamin Vedder 2022-11-16 13:48:50 +01:00
parent c9c90abfda
commit 375917baa3
1 changed files with 2 additions and 2 deletions

View File

@ -32,8 +32,8 @@
#include <math.h>
#include <string.h>
#define SINCOS_MIN_AMPLITUDE 1.0 // sqrt(sin^2 + cos^2) has to be larger than this
#define SINCOS_MAX_AMPLITUDE 1.65 // sqrt(sin^2 + cos^2) has to be smaller than this
#define SINCOS_MIN_AMPLITUDE 0.7 // sqrt(sin^2 + cos^2) has to be larger than this
#define SINCOS_MAX_AMPLITUDE 1.3 // sqrt(sin^2 + cos^2) has to be smaller than this
bool enc_sincos_init(ENCSINCOS_config_t *cfg) {
memset(&cfg->state, 0, sizeof(ENCSINCOS_state));