Add Clang-Format file and apply it

The format tries to maintain the previously used Libre Solar firmware coding
style as much as possible.

Applying the format fixed some issues and re-ordered some parts of the code.
This commit is contained in:
Martin Jäger
2022-01-26 13:56:31 +01:00
committed by Martin Jäger
parent 2359a96bbe
commit 5bdbecf19d
45 changed files with 1036 additions and 986 deletions
+7 -7
View File
@@ -4,17 +4,17 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include "tests.h"
#include "half_bridge.h"
#include "tests.h"
#include <time.h>
#include <stdio.h>
#include <math.h>
#include <stdio.h>
#include <time.h>
#define MAX_PWM_DUTY 0.97
#define MIN_PWM_DUTY 0.1
#define MID_PWM_DUTY ((MIN_PWM_DUTY + MAX_PWM_DUTY)/2)
#define PWM_F_KHZ 70
#define MAX_PWM_DUTY 0.97
#define MIN_PWM_DUTY 0.1
#define MID_PWM_DUTY ((MIN_PWM_DUTY + MAX_PWM_DUTY) / 2)
#define PWM_F_KHZ 70
#define PWM_DEADTIME_NS 300
const float duty_epsilon = 0.006;