alexh-name / bsec_bme680_linux

Read the BME680 sensor with the BSEC library on Linux (e.g. Raspberry Pi)
Other
88 stars 48 forks source link

1.4.7.2 no compiling #18

Closed pawelosin closed 5 years ago

pawelosin commented 5 years ago

I have a problem with compile

pi@raspberrypi:~/bsec_bme680_linux $ ./make.sh Patching... File /home/pi/homebridge-bme680/src/BSEC_1.4.7.2_Generic_Release_20190122/examples/ is not a regular file -- refusing to patch 2 out of 2 hunks ignored -- saving rejects to file /home/pi/homebridge-bme680/src/BSEC_1.4.7.2_Generic_Release_20190122/examples/.rej

The content of the .rej file:

--- bsec_integration.c +++ bsec_integration.c @@ -84,7 +84,7 @@ / local macro definitions / /**/

-#define NUM_USED_OUTPUTS 8 +#define NUM_USED_OUTPUTS 10

/**/ / global variable declarations / @@ -135,6 +135,10 @@ static bsec_library_return_t bme680_bsec_update_subscription(float sample_rate) requested_virtual_sensors[6].sample_rate = sample_rate; requested_virtual_sensors[7].sensor_id = BSEC_OUTPUT_STATIC_IAQ; requested_virtual_sensors[7].sample_rate = sample_rate;

What am I doing wrong?

alexh-name commented 5 years ago

I missed giving patch the directory option. Fixed in latest commit.

pawelosin commented 5 years ago

Now i have the following result: Patching... patching file bsec_integration.c Compiling... ./bsec_bme680.c: In function ‘bus_write’: ./bsec_bme680.c:81:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode for (int i=1; i<data_len+1; i++) ^ ./bsec_bme680.c:81:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code

alexh-name commented 5 years ago

Thanks for pointing out. Fixed with 4c31c04b2f092b1cf047bc08923a628088b54f60.

pawelosin commented 5 years ago

Now the compilation is ok. After run i see teperature, humidity and air pressure correct, but air quality isn't correct for me:

2019-04-06 09:25:14,[IAQ (0)]: 25.00,[T degC]: 20.79,[H %rH]: 45.81,[P hPa]: 1003.38,[G Ohms]: 165187,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750 2019-04-06 09:25:17,[IAQ (0)]: 25.00,[T degC]: 20.84,[H %rH]: 45.59,[P hPa]: 1003.32,[G Ohms]: 169706,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750 2019-04-06 09:25:20,[IAQ (0)]: 25.00,[T degC]: 20.89,[H %rH]: 45.40,[P hPa]: 1003.30,[G Ohms]: 174661,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750 2019-04-06 09:25:23,[IAQ (0)]: 25.00,[T degC]: 20.92,[H %rH]: 45.29,[P hPa]: 1003.30,[G Ohms]: 178002,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750 2019-04-06 09:25:26,[IAQ (0)]: 25.00,[T degC]: 20.93,[H %rH]: 45.23,[P hPa]: 1003.24,[G Ohms]: 181081,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750 2019-04-06 09:25:29,[IAQ (0)]: 25.00,[T degC]: 20.95,[H %rH]: 45.17,[P hPa]: 1003.34,[G Ohms]: 183864,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750 2019-04-06 09:25:32,[IAQ (0)]: 25.00,[T degC]: 20.97,[H %rH]: 45.09,[P hPa]: 1003.36,[G Ohms]: 185905,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750 2019-04-06 09:25:35,[IAQ (0)]: 25.00,[T degC]: 20.97,[H %rH]: 45.08,[P hPa]: 1003.40,[G Ohms]: 187277,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750 2019-04-06 09:25:38,[IAQ (0)]: 25.00,[T degC]: 20.98,[H %rH]: 45.04,[P hPa]: 1003.40,[G Ohms]: 188996,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750 2019-04-06 09:25:41,[IAQ (0)]: 25.00,[T degC]: 21.00,[H %rH]: 44.99,[P hPa]: 1003.40,[G Ohms]: 190969,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750

alexh-name commented 5 years ago

This project gets the readings directly from the BSEC library. You should consult the documentation of your sensor.