From ad3252473466168ffe4e37a389ede03d6a2aa2a2 Mon Sep 17 00:00:00 2001
From: schneider <schneider@blinkenlichts.net>
Date: Tue, 28 Apr 2020 19:32:52 +0200
Subject: [PATCH] chore(bsec): Apply code style

---
 epicardium/modules/bsec.c | 47 ++++++++++++++++++++++++++++++---------
 1 file changed, 37 insertions(+), 10 deletions(-)

diff --git a/epicardium/modules/bsec.c b/epicardium/modules/bsec.c
index 8e8ce2c4..54e81dbc 100644
--- a/epicardium/modules/bsec.c
+++ b/epicardium/modules/bsec.c
@@ -19,7 +19,41 @@
 TaskHandle_t bsec_task_id;
 
 // From generic_18v_3s_4d/bsec_serialized_configurations_iaq.c
-static const uint8_t bsec_config_generic_18v_3s_4d[454] = {4,7,4,1,61,0,0,0,0,0,0,0,174,1,0,0,48,0,1,0,0,192,168,71,64,49,119,76,0,0,225,68,137,65,0,63,205,204,204,62,0,0,64,63,205,204,204,62,0,0,0,0,216,85,0,100,0,0,0,0,0,0,0,0,28,0,2,0,0,244,1,225,0,25,0,0,128,64,0,0,32,65,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,88,0,9,0,7,240,150,61,0,0,0,0,0,0,0,0,28,124,225,61,52,128,215,63,0,0,160,64,0,0,0,0,0,0,0,0,205,204,12,62,103,213,39,62,230,63,76,192,0,0,0,0,0,0,0,0,145,237,60,191,251,58,64,63,177,80,131,64,0,0,0,0,0,0,0,0,93,254,227,62,54,60,133,191,0,0,64,64,12,0,10,0,0,0,0,0,0,0,0,0,229,0,254,0,2,1,5,48,117,100,0,44,1,112,23,151,7,132,3,197,0,92,4,144,1,64,1,64,1,144,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,112,23,112,23,112,23,112,23,112,23,112,23,112,23,112,23,112,23,112,23,112,23,112,23,112,23,112,23,255,255,255,255,255,255,255,255,220,5,220,5,220,5,255,255,255,255,255,255,220,5,220,5,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,44,1,0,0,0,0,52,233,0,0};
+static const uint8_t bsec_config_generic_18v_3s_4d[454] = {
+	4,   7,   4,   1,   61,  0,   0,   0,   0,   0,   0,   0,   174, 1,
+	0,   0,   48,  0,   1,   0,   0,   192, 168, 71,  64,  49,  119, 76,
+	0,   0,   225, 68,  137, 65,  0,   63,  205, 204, 204, 62,  0,   0,
+	64,  63,  205, 204, 204, 62,  0,   0,   0,   0,   216, 85,  0,   100,
+	0,   0,   0,   0,   0,   0,   0,   0,   28,  0,   2,   0,   0,   244,
+	1,   225, 0,   25,  0,   0,   128, 64,  0,   0,   32,  65,  144, 1,
+	0,   0,   112, 65,  0,   0,   0,   63,  16,  0,   3,   0,   10,  215,
+	163, 60,  10,  215, 35,  59,  10,  215, 35,  59,  9,   0,   5,   0,
+	0,   0,   0,   0,   1,   88,  0,   9,   0,   7,   240, 150, 61,  0,
+	0,   0,   0,   0,   0,   0,   0,   28,  124, 225, 61,  52,  128, 215,
+	63,  0,   0,   160, 64,  0,   0,   0,   0,   0,   0,   0,   0,   205,
+	204, 12,  62,  103, 213, 39,  62,  230, 63,  76,  192, 0,   0,   0,
+	0,   0,   0,   0,   0,   145, 237, 60,  191, 251, 58,  64,  63,  177,
+	80,  131, 64,  0,   0,   0,   0,   0,   0,   0,   0,   93,  254, 227,
+	62,  54,  60,  133, 191, 0,   0,   64,  64,  12,  0,   10,  0,   0,
+	0,   0,   0,   0,   0,   0,   0,   229, 0,   254, 0,   2,   1,   5,
+	48,  117, 100, 0,   44,  1,   112, 23,  151, 7,   132, 3,   197, 0,
+	92,  4,   144, 1,   64,  1,   64,  1,   144, 1,   48,  117, 48,  117,
+	48,  117, 48,  117, 100, 0,   100, 0,   100, 0,   48,  117, 48,  117,
+	48,  117, 100, 0,   100, 0,   48,  117, 48,  117, 100, 0,   100, 0,
+	100, 0,   100, 0,   48,  117, 48,  117, 48,  117, 100, 0,   100, 0,
+	100, 0,   48,  117, 48,  117, 100, 0,   100, 0,   44,  1,   44,  1,
+	44,  1,   44,  1,   44,  1,   44,  1,   44,  1,   44,  1,   44,  1,
+	44,  1,   44,  1,   44,  1,   44,  1,   44,  1,   8,   7,   8,   7,
+	8,   7,   8,   7,   8,   7,   8,   7,   8,   7,   8,   7,   8,   7,
+	8,   7,   8,   7,   8,   7,   8,   7,   8,   7,   112, 23,  112, 23,
+	112, 23,  112, 23,  112, 23,  112, 23,  112, 23,  112, 23,  112, 23,
+	112, 23,  112, 23,  112, 23,  112, 23,  112, 23,  255, 255, 255, 255,
+	255, 255, 255, 255, 220, 5,   220, 5,   220, 5,   255, 255, 255, 255,
+	255, 255, 220, 5,   220, 5,   255, 255, 255, 255, 255, 255, 255, 255,
+	255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+	255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 44,  1,   0,   0,
+	0,   0,   52,  233, 0,   0
+};
 
 /**********************************************************************************************************************/
 /* header files */
@@ -185,8 +219,7 @@ i2c_write(uint8_t addr, uint8_t reg, uint8_t *p_buf, uint16_t size)
 	return ret;
 }
 
-static int8_t
-i2c_read(uint8_t addr, uint8_t reg, uint8_t *p_buf, uint16_t size)
+static int8_t i2c_read(uint8_t addr, uint8_t reg, uint8_t *p_buf, uint16_t size)
 {
 	int8_t ret;
 	hwlock_acquire(HWLOCK_I2C);
@@ -302,13 +335,7 @@ void vBSECTask(void *pvParameters)
 	//bsec_iot_loop(card10_bosch_delay, get_timestamp_us, output_ready, state_save, 10000);
 
 	/* State is saved every 1200 samples, which means every 1200 * 3 secs = 60 minutes  */
-	bsec_iot_loop(
-		delay,
-		get_timestamp_us,
-		output_ready,
-		state_save,
-		1200
-	);
+	bsec_iot_loop(delay, get_timestamp_us, output_ready, state_save, 1200);
 #endif
 	while (1)
 		;
-- 
GitLab