Skip to content

Commit af7d5e2

Browse files
committed
Fixes misnamed register, and misused comparator
* Rolls version
1 parent dbc0455 commit af7d5e2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun Qwiic Haptic Driver DA7280 Library
2-
version=1.0.2
2+
version=1.0.3
33
author=Elias Santistevan <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for the DA7280 Haptic Driver

src/Haptic_Driver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ bool Haptic_Driver::defaultMotor(){
8484

8585

8686
sparkSettings.motorType = LRA_TYPE;
87-
sparkSettings.nomVolt = 2.5; //volts - not used when acceleration is off, set nominal when on
88-
sparkSettings.absVolt = 2.5; // volts - when acceleration is off, set this only
87+
sparkSettings.nomVolt = 0; //volts - set to 2.5 when acceleration is ON
88+
sparkSettings.absVolt = 2.26; // volts - when acceleration is off, set this only
8989
sparkSettings.currMax = 165.4; // milliamps -
9090
sparkSettings.impedance = 13.8; // ohms
9191
sparkSettings.lraFreq = 170; // hertz
@@ -402,7 +402,7 @@ bool Haptic_Driver::setVibrate(uint8_t val){
402402

403403
if( accelState == ENABLE ){
404404
if( val > 0x7F )
405-
val == 0x7F; // Just limit the argument to the physical limit
405+
val = 0x7F; // Just limit the argument to the physical limit
406406
}
407407
else {
408408
if( val > 0xFF )

src/Haptic_Driver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ enum REGISTERS {
127127
TOP_INT_CFG8 = 0x20,
128128
TOP_CTL1 = 0x22,
129129
TOP_CTL2,
130-
SEG_CTL1,
130+
SEQ_CTL1,
131131
SWG_C1,
132132
SWG_C2,
133133
SWG_C3,

0 commit comments

Comments
 (0)