diff --git a/.github/workflows/astyle.yml b/.github/workflows/astyle.yml index 1eccd60..9176a2e 100644 --- a/.github/workflows/astyle.yml +++ b/.github/workflows/astyle.yml @@ -20,7 +20,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Install Artistic Style - name: Install Astyle diff --git a/.github/workflows/ceedling.yml b/.github/workflows/ceedling.yml index e1a6ecb..bacdf3e 100644 --- a/.github/workflows/ceedling.yml +++ b/.github/workflows/ceedling.yml @@ -20,16 +20,16 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Set up Ruby 2.7 + - name: Set up Ruby 3.0 uses: ruby/setup-ruby@v1 with: - ruby-version: '2.7' + ruby-version: '3.0' # Runs a single command using the runners shell - name: Install Ceedling - run: gem install ceedling + run: gem install ceedling -v 0.31.1 # Runs a set of commands using the runners shell - name: Run a multi-line script diff --git a/.github/workflows/gh-pages-check.yml b/.github/workflows/gh-pages-check.yml index 4bf4ae7..7364b8f 100644 --- a/.github/workflows/gh-pages-check.yml +++ b/.github/workflows/gh-pages-check.yml @@ -18,7 +18,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/gh-pages-push.yml b/.github/workflows/gh-pages-push.yml index 92f4719..c5d3646 100644 --- a/.github/workflows/gh-pages-push.yml +++ b/.github/workflows/gh-pages-push.yml @@ -18,7 +18,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml index d671ef0..64a59b6 100644 --- a/.github/workflows/sonar-scan.yml +++ b/.github/workflows/sonar-scan.yml @@ -19,7 +19,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout submodules run: git submodule update --init --recursive @@ -40,21 +40,20 @@ jobs: unzip -q nRF5_SDK_15.3.0_59ac345.zip fi - # Runs a single command using the runners shell - - name: Compile project - run: build-wrapper-linux-x86-64 --out-dir bw-output make sonar - - - name: Set up Ruby 2.7 + - name: Set up Ruby 3.0 uses: ruby/setup-ruby@v1 with: - ruby-version: '2.7' + ruby-version: '3.0' # Runs a single command using the runners shell - name: Install Ceedling and GCovr run: | - gem install ceedling + gem install ceedling -v 0.31.1 sudo pip install gcovr + # Runs a single command using the runners shell + - name: Compile project + run: build-wrapper-linux-x86-64 --out-dir bw-output make sonar # Runs a set of commands using the runners shell - name: Run Sonar scanner diff --git a/src/ruuvi_endpoints.h b/src/ruuvi_endpoints.h index b10102d..40341ba 100644 --- a/src/ruuvi_endpoints.h +++ b/src/ruuvi_endpoints.h @@ -88,6 +88,10 @@ typedef float re_float; //!< Ruuvi endpoint float type #define RE_STANDARD_LOG_VALUE_READ (RE_STANDARD_LOG_VALUE_WRITE | \ RE_STANDARD_OP_READ_BIT) +#define RE_STANDARD_LOG_MULTI_WRITE (0x20U) +#define RE_STANDARD_LOG_MULTI_READ (RE_STANDARD_LOG_MULTI_WRITE | \ + RE_STANDARD_OP_READ_BIT) + #define RE_SYS_CONFIG_WRITE_HEARTBEAT (0xF2U) #define RE_SYS_CONFIG_READ_HEARTBEAT (RE_SYS_CONFIG_WRITE_HEARTBEAT | \ RE_STANDARD_OP_READ_BIT) @@ -113,6 +117,29 @@ typedef float re_float; //!< Ruuvi endpoint float type #define RE_LOG_WRITE_VALUE_B3_IDX (9U) //!< B3 of value. #define RE_LOG_WRITE_VALUE_LSB_IDX (10U) //!< LSB of value. +#define RE_LOG_WRITE_MULTI_NUM_RECORDS_IDX (3U) //!< Number of records. +#define RE_LOG_WRITE_MULTI_RECORD_LEN_IDX (4U) //!< Length of record. +#define RE_LOG_WRITE_MULTI_PAYLOAD_IDX (5U) //!< Start of payload. + +#define RE_LOG_WRITE_AIRQ_TIMESTAMP_MSB_OFS (0U) //!< MSB offset of timestamp. +#define RE_LOG_WRITE_AIRQ_TEMPERATURE_MSB_OFS (4U) //!< MSB offset of temperature. +#define RE_LOG_WRITE_AIRQ_HUMIDITY_MSB_OFS (6U) //!< MSB offset of humidity. +#define RE_LOG_WRITE_AIRQ_PRESSURE_MSB_OFS (8U) //!< MSB offset of pressure. +#define RE_LOG_WRITE_AIRQ_PM1P0_MSB_OFS (10U) //!< MSB offset of pm1p0. +#define RE_LOG_WRITE_AIRQ_PM2P5_MSB_OFS (12U) //!< MSB offset of pm2p5. +#define RE_LOG_WRITE_AIRQ_PM4P0_MSB_OFS (14U) //!< MSB offset of pm4p0. +#define RE_LOG_WRITE_AIRQ_PM10P0_MSB_OFS (16U) //!< MSB offset of pm10p0. +#define RE_LOG_WRITE_AIRQ_CO2_MSB_OFS (18U) //!< MSB offset of CO2. +#define RE_LOG_WRITE_AIRQ_VOC_MSB_OFS (20U) //!< MSB offset of VOC index. +#define RE_LOG_WRITE_AIRQ_NOX_MSB_OFS (22U) //!< MSB offset of NOx index. +#define RE_LOG_WRITE_AIRQ_LUMINOSITY_MSB_OFS (24U) //!< MSB offset of luminosity. +#define RE_LOG_WRITE_AIRQ_SOUND_DBA_AVG_OFS (26U) //!< MSB offset of sound_dba_avg. +#define RE_LOG_WRITE_AIRQ_SOUND_DBA_PEAK_OFS (27U) //!< MSB offset of sound_dba_peak. +#define RE_LOG_WRITE_AIRQ_VOLTAGE_MSB_OFS (28U) //!< MSB offset of voltage. +#define RE_LOG_WRITE_AIRQ_FLAGS_MSB_OFS (30U) //!< MSB offset of flags. +#define RE_LOG_WRITE_AIRQ_RECORD_LEN (32U) //!< Length of record. + + #define RE_STANDARD_DESTINATION_ACCELERATION (0x4AU) //!< XYZ acceleration combined #define RE_STANDARD_DESTINATION_ACCELERATION_X (0x40U) //!< X acceleration #define RE_STANDARD_DESTINATION_ACCELERATION_Y (0x41U) //!< Y acceleration @@ -125,10 +152,11 @@ typedef float re_float; //!< Ruuvi endpoint float type #define RE_STANDARD_DESTINATION_HUMIDITY (0x31U) //!< Humidity #define RE_STANDARD_DESTINATION_PRESSURE (0x32U) //!< Pressure #define RE_STANDARD_DESTINATION_ENVIRONMENTAL (0x3AU) //!< Temp Humi Pres combined. +#define RE_STANDARD_DESTINATION_AIRQ (0x3BU) //!< All AIRQ measurements combined. #define RE_STANDARD_DESTINATION_ADC_BATTERY (0x20U) //!< ADC battery vs GND #define RE_STANDARD_DESTINATION_RTC (0x21U) //!< RTC value #define RE_STANDARD_DESTINATION_PASSWORD (0x2AU) //!< Password endpoint. -#define RE_STANDARD_DESTINATION_SYS_CONFIG (0x22U) //!< Configuration of system settings +#define RE_STANDARD_DESTINATION_SYS_CONFIG (0x22U) //!< Configuration of system settings typedef enum { @@ -141,6 +169,7 @@ typedef enum RE_GYR_Y = RE_STANDARD_DESTINATION_GYRATION_Y, RE_GYR_Z = RE_STANDARD_DESTINATION_GYRATION_Z, RE_ENV_ALL = RE_STANDARD_DESTINATION_ENVIRONMENTAL, + RE_ENV_AIRQ = RE_STANDARD_DESTINATION_AIRQ, RE_ENV_TEMP = RE_STANDARD_DESTINATION_TEMPERATURE, RE_ENV_HUMI = RE_STANDARD_DESTINATION_HUMIDITY, RE_ENV_PRES = RE_STANDARD_DESTINATION_PRESSURE, @@ -161,7 +190,9 @@ typedef enum RE_SENSOR_CONFIG_W = RE_STANDARD_SENSOR_CONFIGURATION_WRITE, RE_SENSOR_CONFIG_R = RE_STANDARD_SENSOR_CONFIGURATION_READ, RE_LOG_W = RE_STANDARD_LOG_VALUE_WRITE, - RE_LOG_R = RE_STANDARD_LOG_VALUE_READ + RE_LOG_R = RE_STANDARD_LOG_VALUE_READ, + RE_LOG_W_MULTI = RE_STANDARD_LOG_MULTI_WRITE, + RE_LOG_R_MULTI = RE_STANDARD_LOG_MULTI_READ, } re_op_t; /**