mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
sonar: fix sonar scan
remove utf8 characters from: * examples/c++/mcp9808.cxx * examples/c++/tmp006.cxx * src/bmp280/bmp280.c * src/max30100/max30100.c add -j8 options to make command in scripts/sonar-scan.sh Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
This commit is contained in:
parent
24b6cbcc85
commit
7bee29ba62
@ -21,7 +21,7 @@ services:
|
|||||||
- BUILDSWIGPYTHON=${BUILDSWIGPYTHON:-OFF}
|
- BUILDSWIGPYTHON=${BUILDSWIGPYTHON:-OFF}
|
||||||
- BUILDSWIGJAVA=${BUILDSWIGJAVA:-OFF}
|
- BUILDSWIGJAVA=${BUILDSWIGJAVA:-OFF}
|
||||||
- BUILDSWIGNODE=${BUILDSWIGNODE:-OFF}
|
- BUILDSWIGNODE=${BUILDSWIGNODE:-OFF}
|
||||||
- BUILDEXAMPLES=${BUILDEXAMPLE:-ON}
|
- BUILDEXAMPLES=${BUILDEXAMPLES:-ON}
|
||||||
- IPK=${IPK:-OFF}
|
- IPK=${IPK:-OFF}
|
||||||
- RPM=${RPM:-OFF}
|
- RPM=${RPM:-OFF}
|
||||||
- NPM=${NPM:-OFF}
|
- NPM=${NPM:-OFF}
|
||||||
@ -50,6 +50,7 @@ services:
|
|||||||
- BUILDSWIGPYTHON=ON
|
- BUILDSWIGPYTHON=ON
|
||||||
- BUILDSWIGNODE=ON
|
- BUILDSWIGNODE=ON
|
||||||
- BUILDSWIGJAVA=ON
|
- BUILDSWIGJAVA=ON
|
||||||
|
- BUILDSWIGEXAMPLES=ON
|
||||||
- SONAR_TOKEN
|
- SONAR_TOKEN
|
||||||
- SONAR_ORG
|
- SONAR_ORG
|
||||||
- SONAR_PROJ_KEY
|
- SONAR_PROJ_KEY
|
||||||
|
@ -42,7 +42,7 @@ int main()
|
|||||||
{
|
{
|
||||||
float t;
|
float t;
|
||||||
case 1:
|
case 1:
|
||||||
std::cout << "Temp: " << temp->getTemp() << "° " << (temp->isCelsius()? "Celsius" : "Fahrenheit")<< std::endl;
|
std::cout << "Temp: " << temp->getTemp() << "* " << (temp->isCelsius()? "Celsius" : "Fahrenheit")<< std::endl;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
cout << "shutdown sensor (sleep mode)" << endl;
|
cout << "shutdown sensor (sleep mode)" << endl;
|
||||||
|
@ -58,8 +58,8 @@ int main(int argc, char **argv)
|
|||||||
// update and print available values every second
|
// update and print available values every second
|
||||||
while (run)
|
while (run)
|
||||||
{
|
{
|
||||||
// Print out temperature value in °C
|
// Print out temperature value in *C
|
||||||
std::cout << "Temperature: " << mySensor->getTemperature(true) << " °C"
|
std::cout << "Temperature: " << mySensor->getTemperature(true) << " *C"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
@ -30,7 +30,7 @@ SONAR_TOKEN=${SONAR_TOKEN:?value not provided}
|
|||||||
|
|
||||||
bw_output_path="${UPM_SRC_DIR}/build/bw-output"
|
bw_output_path="${UPM_SRC_DIR}/build/bw-output"
|
||||||
|
|
||||||
sonar_cmd_base="build-wrapper-linux-x86-64 --out-dir ${bw_output_path} make clean all && \
|
sonar_cmd_base="build-wrapper-linux-x86-64 --out-dir ${bw_output_path} make -j8 clean all && \
|
||||||
sonar-scanner \
|
sonar-scanner \
|
||||||
--debug \
|
--debug \
|
||||||
-Dsonar.projectKey=${SONAR_PROJ_KEY} \
|
-Dsonar.projectKey=${SONAR_PROJ_KEY} \
|
||||||
|
@ -84,7 +84,7 @@ static int32_t _bmp280_compensate_T_int32(const bmp280_context dev,
|
|||||||
|
|
||||||
// Returns pressure in Pa as unsigned 32 bit integer in Q24.8 format
|
// Returns pressure in Pa as unsigned 32 bit integer in Q24.8 format
|
||||||
// (24 integer bits and 8 fractional bits). Output value of
|
// (24 integer bits and 8 fractional bits). Output value of
|
||||||
// “24674867” represents 24674867/256 = 96386.2 Pa = 963.862 hPa
|
// "24674867" represents 24674867/256 = 96386.2 Pa = 963.862 hPa
|
||||||
static uint32_t _bmp280_compensate_P_int64(const bmp280_context dev,
|
static uint32_t _bmp280_compensate_P_int64(const bmp280_context dev,
|
||||||
int32_t adc_P)
|
int32_t adc_P)
|
||||||
{
|
{
|
||||||
@ -111,7 +111,7 @@ static uint32_t _bmp280_compensate_P_int64(const bmp280_context dev,
|
|||||||
|
|
||||||
// This function comes from the BME280 datasheet, section 4.2.3
|
// This function comes from the BME280 datasheet, section 4.2.3
|
||||||
// Returns humidity in %RH as unsigned 32 bit integer in Q22.10 format
|
// Returns humidity in %RH as unsigned 32 bit integer in Q22.10 format
|
||||||
// (22 integer and 10 fractional bits). Output value of “47445”
|
// (22 integer and 10 fractional bits). Output value of "47445"
|
||||||
// represents 47445/1024 = 46.333 %RH
|
// represents 47445/1024 = 46.333 %RH
|
||||||
// BME280 only
|
// BME280 only
|
||||||
static uint32_t _bme280_compensate_H_int32(const bmp280_context dev,
|
static uint32_t _bme280_compensate_H_int32(const bmp280_context dev,
|
||||||
@ -135,7 +135,7 @@ static upm_result_t _read_calibration_data(const bmp280_context dev)
|
|||||||
assert(dev != NULL);
|
assert(dev != NULL);
|
||||||
|
|
||||||
#if defined(BMP280_USE_TEST_DATA)
|
#if defined(BMP280_USE_TEST_DATA)
|
||||||
printf("%s: WARNING: Test data is being used\n", __FUNCTIOM__);
|
printf("%s: WARNING: Test data is being used\n", __FUNCTION__);
|
||||||
|
|
||||||
// This data is taken from the datasheet, section 3.12
|
// This data is taken from the datasheet, section 3.12
|
||||||
dev->dig_T1 = 27504;
|
dev->dig_T1 = 27504;
|
||||||
|
@ -222,7 +222,7 @@ upm_result_t max30100_get_temperature(const max30100_context* dev, float* temper
|
|||||||
/* This register stores the fractional temperature data in increments of
|
/* This register stores the fractional temperature data in increments of
|
||||||
* 0.0625C (1/16th of a degree C). If this fractional temperature is
|
* 0.0625C (1/16th of a degree C). If this fractional temperature is
|
||||||
* paired with a negative integer, it still adds as a positive fractional
|
* paired with a negative integer, it still adds as a positive fractional
|
||||||
* value (e.g., -128°C + 0.5°C = -127.5°C). */
|
* value (e.g., -128 C + 0.5 C = -127.5 C). */
|
||||||
result = max30100_read(dev, MAX30100_REG_TEMP_FRACTION, (uint8_t*)&tmp_val);
|
result = max30100_read(dev, MAX30100_REG_TEMP_FRACTION, (uint8_t*)&tmp_val);
|
||||||
if (result != UPM_SUCCESS) return result;
|
if (result != UPM_SUCCESS) return result;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user