Added temp tests

This commit is contained in:
Magnus 2022-12-02 14:10:53 +01:00
parent 8257e9ab51
commit 83c0bb5283
2 changed files with 4 additions and 6 deletions

View File

@ -58,9 +58,6 @@ void TempSensor::setup() {
#endif #endif
} }
//
// Retrieving value from sensor, value is in Celcius
//
float TempSensor::getValue(bool useGyro) { float TempSensor::getValue(bool useGyro) {
if (useGyro) { if (useGyro) {
// When using the gyro temperature only the first read value will be // When using the gyro temperature only the first read value will be

View File

@ -21,12 +21,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#include <Arduino.h> #include <tempsensor.hpp>
#include <main.hpp>
#include <AUnit.h> #include <AUnit.h>
test(temp_readSensor) { test(temp_readSensor) {
Serial.println("Not implemented yet (temp_readSensor)"); myTempSensor.setup();
myTempSensor.getTempC();
assertEqual( myTempSensor.isSensorAttached(), true );
} }
// EOF // EOF