mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.3.2 I2C_ASDX
This commit is contained in:
parent
882289ee55
commit
94bbde3ef9
@ -1,3 +1,18 @@
|
|||||||
|
platforms:
|
||||||
|
rpipico:
|
||||||
|
board: rp2040:rp2040:rpipico
|
||||||
|
package: rp2040:rp2040
|
||||||
|
gcc:
|
||||||
|
features:
|
||||||
|
defines:
|
||||||
|
- ARDUINO_ARCH_RP2040
|
||||||
|
warnings:
|
||||||
|
flags:
|
||||||
|
|
||||||
|
packages:
|
||||||
|
rp2040:rp2040:
|
||||||
|
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
|
||||||
|
|
||||||
compile:
|
compile:
|
||||||
# Choosing to run compilation tests on 2 different Arduino platforms
|
# Choosing to run compilation tests on 2 different Arduino platforms
|
||||||
platforms:
|
platforms:
|
||||||
@ -9,3 +24,5 @@ compile:
|
|||||||
- esp32
|
- esp32
|
||||||
# - esp8266
|
# - esp8266
|
||||||
# - mega2560
|
# - mega2560
|
||||||
|
- rpipico
|
||||||
|
|
||||||
|
40
libraries/I2C_ASDX/CHANGELOG..md
Normal file
40
libraries/I2C_ASDX/CHANGELOG..md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Change Log I2C_ASDX
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
|
||||||
|
## [0.3.2]
|
||||||
|
- add changelog.md
|
||||||
|
- add RP2040 to build-CI
|
||||||
|
- clean unit test a bit
|
||||||
|
- minor edits
|
||||||
|
|
||||||
|
|
||||||
|
## [0.3.0] - 2021-06-07
|
||||||
|
- add multiWire interface
|
||||||
|
|
||||||
|
## [0.3.1] - 2021-12-19
|
||||||
|
- update library.json, license, minor edits
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
## [0.2.3 - 2021-06-06
|
||||||
|
- add different units to read pressure
|
||||||
|
|
||||||
|
## [0.2.2 - 2020-12-29
|
||||||
|
- add Arduino-CI + unit test (minimal)
|
||||||
|
- update keywords
|
||||||
|
|
||||||
|
## [0.2.1 - 2020-07-04
|
||||||
|
- add getBar(), getMilliBar(), getPSI()
|
||||||
|
|
||||||
|
## [0.2.0 - 2020-03-18
|
||||||
|
- refactor
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
## [0.1.0] - 2013-11-14
|
||||||
|
- initial version
|
||||||
|
|
@ -1,18 +1,11 @@
|
|||||||
//
|
//
|
||||||
// FILE: I2C_ASDX.cpp
|
// FILE: I2C_ASDX.cpp
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.3.1
|
// VERSION: 0.3.2
|
||||||
// PURPOSE: I2C_asdx library for Arduino.
|
// PURPOSE: I2C_asdx library for Arduino.
|
||||||
// URL: https://github.com/RobTillaart/I2C_ASDX
|
// URL: https://github.com/RobTillaart/I2C_ASDX
|
||||||
//
|
//
|
||||||
// HISTORY:
|
// HISTORY: see changelog.md
|
||||||
// 0.1.0 2013-11-14 initial version
|
|
||||||
// 0.2.0 2020-03-18 refactor
|
|
||||||
// 0.2.1 2020-07-04 add getBar(), getMilliBar(), getPSI()
|
|
||||||
// 0.2.2 2020-12-29 add Arduino-CI + unit test (minimal), keywords update.
|
|
||||||
// 0.2.3 2021-06-06 add different units to read pressure
|
|
||||||
// 0.3.0 2021-06-07 add multiWire interface
|
|
||||||
// 0.3.1 2021-12-19 update library.json, license, minor edits
|
|
||||||
|
|
||||||
|
|
||||||
#include "I2C_ASDX.h"
|
#include "I2C_ASDX.h"
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
//
|
//
|
||||||
// FILE: I2C_ASDX.h
|
// FILE: I2C_ASDX.h
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.3.1
|
// VERSION: 0.3.2
|
||||||
// PURPOSE: Arduino library for I2C ASDX pressure sensor
|
// PURPOSE: Arduino library for I2C ASDX pressure sensor
|
||||||
// URL: https://github.com/RobTillaart/I2C_ASDX
|
// URL: https://github.com/RobTillaart/I2C_ASDX
|
||||||
//
|
//
|
||||||
// HISTORY: See I2C_ASDX.cpp
|
// HISTORY: see changelog.md
|
||||||
|
|
||||||
// TESTED TYPES - type A 10% - 90% only
|
// TESTED TYPES - type A 10% - 90% only
|
||||||
//
|
//
|
||||||
@ -25,7 +25,7 @@
|
|||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
|
|
||||||
|
|
||||||
#define I2C_ASDX_VERSION (F("0.3.1"))
|
#define I2C_ASDX_VERSION (F("0.3.2"))
|
||||||
|
|
||||||
|
|
||||||
// factors to convert PSI to mBar and back
|
// factors to convert PSI to mBar and back
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/RobTillaart/I2C_ASDX.git"
|
"url": "https://github.com/RobTillaart/I2C_ASDX.git"
|
||||||
},
|
},
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"frameworks": "arduino",
|
"frameworks": "arduino",
|
||||||
"platforms": "*",
|
"platforms": "*",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name=I2C_ASDX
|
name=I2C_ASDX
|
||||||
version=0.3.1
|
version=0.3.2
|
||||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||||
sentence=Arduino library for I2C ASDX pressure sensor
|
sentence=Arduino library for I2C ASDX pressure sensor
|
||||||
|
@ -29,13 +29,13 @@
|
|||||||
// assertNAN(arg); // isnan(a)
|
// assertNAN(arg); // isnan(a)
|
||||||
// assertNotNAN(arg); // !isnan(a)
|
// assertNotNAN(arg); // !isnan(a)
|
||||||
|
|
||||||
|
|
||||||
#include <ArduinoUnitTests.h>
|
#include <ArduinoUnitTests.h>
|
||||||
|
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
#include "I2C_ASDX.h"
|
#include "I2C_ASDX.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unittest_setup()
|
unittest_setup()
|
||||||
{
|
{
|
||||||
fprintf(stderr, "I2C_ASDX_VERSION: %s\n", (char *) I2C_ASDX_VERSION);
|
fprintf(stderr, "I2C_ASDX_VERSION: %s\n", (char *) I2C_ASDX_VERSION);
|
||||||
@ -45,19 +45,6 @@ unittest_teardown()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
unittest(test_new_operator)
|
|
||||||
{
|
|
||||||
assertEqualINF(exp(800));
|
|
||||||
assertEqualINF(0.0/0.0);
|
|
||||||
assertEqualINF(42);
|
|
||||||
|
|
||||||
assertEqualNAN(INFINITY - INFINITY);
|
|
||||||
assertEqualNAN(0.0/0.0);
|
|
||||||
assertEqualNAN(42);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
unittest(test_constructor)
|
unittest(test_constructor)
|
||||||
{
|
{
|
||||||
@ -66,8 +53,8 @@ unittest(test_constructor)
|
|||||||
assertEqual(I2C_ASDX_INIT, sensor.state());
|
assertEqual(I2C_ASDX_INIT, sensor.state());
|
||||||
|
|
||||||
assertTrue(sensor.begin());
|
assertTrue(sensor.begin());
|
||||||
assertTrue(sensor.isConnected()); // incorrect, keep build happy
|
assertTrue(sensor.isConnected()); // incorrect, keep build happy
|
||||||
assertTrue(sensor.available()); // obsolete in the future
|
assertTrue(sensor.available()); // obsolete in the future
|
||||||
|
|
||||||
fprintf(stderr, "test state\n");
|
fprintf(stderr, "test state\n");
|
||||||
assertEqual(0, sensor.errorCount());
|
assertEqual(0, sensor.errorCount());
|
||||||
@ -111,7 +98,7 @@ unittest(test_read_zero)
|
|||||||
I2C_ASDX sensor(0x58, 100);
|
I2C_ASDX sensor(0x58, 100);
|
||||||
|
|
||||||
assertTrue(sensor.begin());
|
assertTrue(sensor.begin());
|
||||||
assertTrue(sensor.isConnected()); // incorrect, keep build happy
|
assertTrue(sensor.isConnected()); // incorrect, keep build happy
|
||||||
|
|
||||||
fprintf(stderr, "Test default pressure\n");
|
fprintf(stderr, "Test default pressure\n");
|
||||||
assertEqual(0, sensor.getPressure());
|
assertEqual(0, sensor.getPressure());
|
||||||
|
Loading…
Reference in New Issue
Block a user