CloudSevenConsulting / DustyDuinoPro

ATAMO Dusty Project
MIT License
0 stars 0 forks source link

Invalid spi() object in AccelMagno library #12

Closed aaron-hurst closed 6 years ago

aaron-hurst commented 6 years ago

Description

The AccelMagno source code uses an object called spi which causes a build error in Atmel Studio 7: image

Cause

The original (pre-version 1.0.1 of duinoPRO) dP_AccelMagno.h file included dP_Module.h which seems to have defined the SPI interfact for the module, including declaring spi. spi was decpared as a "dP_Spi" class, which appears to be a wrapper for the standard Arduino SPI library. (See below screenshot taken from dP_Spi.cpp for evidence to support this conclusion) image

dP_Spi.* has no analogue in the v1.0.1 duinoPRO software. v1.0.1 seems to rely only on the standard Arduino SPI library. Therefore, "spi" is clearly not declared in the scope of the AccelMagno library.

Action

It is suspected that the commands needed for the AccelMagno library can be re-implemented, using just the Arduino SPI.h library to replace the need for the old dP_Spi class.

See dP_Spi.* in pre-v1.0.1 duinoPRO software for what the original functions were and AccelMagno.cpp in the current mote-sample branch for what was used previously/needs to be replaced. Then re-implement/work around the old spi() functions.

ghost commented 6 years ago

Closed with 39d76d6a54f5a9a1bb7a2a1d2ee4d78de83efe42