ish confirmed working

This commit is contained in:
Comma Device
2019-09-12 21:51:53 +10:00
parent 7700b6aa59
commit d3becbacdd
5 changed files with 23 additions and 19 deletions
+3 -3
View File
@@ -240,10 +240,10 @@ class CarState(object):
if self.dragon_toyota_stock_dsu and self.generic_toggle and self.main_on:
enable_acc = True
if not self.gear_shifter == 'drive' or not self.seatbelt or not self.door_all_closed:
enable_acc = False
#if not self.gear_shifter == 'drive' or not self.seatbelt or not self.door_all_closed:
# enable_acc = False
self.pcm_acc_active = enable_acc
if self.standstill:
self.pcm_acc_status = 7
else:
self.pcm_acc_status = 1
self.pcm_acc_status = 1
+17 -14
View File
@@ -1810,7 +1810,9 @@ static void ui_draw_vision(UIState *s) {
glScissor(ui_viz_rx, s->fb_h-(box_y+box_h), ui_viz_rw, box_h);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
draw_frame(s);
if (s->dragon_driving_ui) {
draw_frame(s);
}
glViewport(0, 0, s->fb_w, s->fb_h);
glDisable(GL_SCISSOR_TEST);
@@ -1818,21 +1820,22 @@ static void ui_draw_vision(UIState *s) {
nvgBeginFrame(s->vg, s->fb_w, s->fb_h, 1.0f);
nvgSave(s->vg);
// Draw augmented elements
const int inner_height = viz_w*9/16;
nvgScissor(s->vg, ui_viz_rx, box_y, ui_viz_rw, box_h);
nvgTranslate(s->vg, ui_viz_rx+ui_viz_ro, box_y + (box_h-inner_height)/2.0);
nvgScale(s->vg, (float)viz_w / s->fb_w, (float)inner_height / s->fb_h);
if (!scene->frontview && !scene->fullview) {
ui_draw_world(s);
if (s->dragon_driving_ui) {
// Draw augmented elements
const int inner_height = viz_w*9/16;
nvgScissor(s->vg, ui_viz_rx, box_y, ui_viz_rw, box_h);
nvgTranslate(s->vg, ui_viz_rx+ui_viz_ro, box_y + (box_h-inner_height)/2.0);
nvgScale(s->vg, (float)viz_w / s->fb_w, (float)inner_height / s->fb_h);
if (!scene->frontview && !scene->fullview) {
ui_draw_world(s);
}
}
nvgRestore(s->vg);
// Set Speed, Current Speed, Status/Events
ui_draw_vision_header(s);
if (s->dragon_driving_ui) {
// Set Speed, Current Speed, Status/Events
ui_draw_vision_header(s);
}
if (s->scene.alert_size != ALERTSIZE_NONE) {
// Controls Alerts
ui_draw_vision_alert(s, s->scene.alert_size, s->status,
@@ -1852,7 +1855,7 @@ static void ui_draw_blank(UIState *s) {
}
static void ui_draw(UIState *s) {
if (s->dragon_driving_ui && s->vision_connected && s->plus_state == 0) {
if (s->vision_connected && s->plus_state == 0) {
ui_draw_vision(s);
} else {
ui_draw_blank(s);