openpilot v0.7.9 release

This commit is contained in:
Vehicle Researcher
2020-10-02 01:45:44 +00:00
parent 0aa4867be4
commit 49d82d6ac1
268 changed files with 5985 additions and 5105 deletions
+4 -7
View File
@@ -1,3 +1,4 @@
#include "util.h"
#include <cstdio>
#include <cstdlib>
#include <cassert>
@@ -37,13 +38,9 @@ extern "C" void framebuffer_swap(FramebufferState *s) {
}
extern "C" bool set_brightness(int brightness) {
FILE *f = fopen("/sys/class/leds/lcd-backlight/brightness", "wb");
if (f != NULL) {
fprintf(f, "%d", brightness);
fclose(f);
return true;
}
return false;
char bright[64];
snprintf(bright, sizeof(bright), "%d", brightness);
return 0 == write_file("/sys/class/leds/lcd-backlight/brightness", bright, strlen(bright));
}
extern "C" void framebuffer_set_power(FramebufferState *s, int mode) {