Merge branch 'testing' into devel-i18n

This commit is contained in:
Rick Lan
2020-03-31 11:23:37 +10:00
3 changed files with 26 additions and 15 deletions
+3 -3
View File
@@ -4,8 +4,8 @@ const int TOYOTA_MAX_TORQUE = 1500; // max torque cmd allowed ever
// rate based torque limit + stay within actually applied
// packet is sent at 100hz, so this limit is 1000/sec
const int TOYOTA_MAX_RATE_UP = 10; // ramp up slow
const int TOYOTA_MAX_RATE_DOWN = 44; // ramp down fast
const int TOYOTA_MAX_TORQUE_ERROR = 500; // max torque cmd in excess of torque motor
const int TOYOTA_MAX_RATE_DOWN = 25; // ramp down fast
const int TOYOTA_MAX_TORQUE_ERROR = 350; // max torque cmd in excess of torque motor
// real time torque limit to prevent controls spamming
// the real time limit is 1500/sec
@@ -13,7 +13,7 @@ const int TOYOTA_MAX_RT_DELTA = 375; // max delta torque allowed for real t
const uint32_t TOYOTA_RT_INTERVAL = 250000; // 250ms between real time checks
// longitudinal limits
const int TOYOTA_MAX_ACCEL = 4000; // 1.5 m/s2
const int TOYOTA_MAX_ACCEL = 1500; // 1.5 m/s2
const int TOYOTA_MIN_ACCEL = -3000; // 3.0 m/s2
const int TOYOTA_STANDSTILL_THRSLD = 100; // 1kph
+13 -10
View File
@@ -216,17 +216,20 @@ def thermald_thread():
if ts - ts_last_update_vars >= 10.:
modified = dp_get_last_modified()
if dp_last_modified != modified:
dragon_charging_ctrl = True if params.get('DragonChargingCtrl', encoding='utf8') == "1" else False
dp_temp_monitor = True if params.get('DragonEnableTempMonitor', encoding='utf8') == "1" else False
if dragon_charging_ctrl:
try:
dragon_to_discharge = int(params.get('DragonCharging', encoding='utf8'))
except (TypeError, ValueError):
dragon_to_discharge = 70
try:
dragon_to_charge = int(params.get('DragonDisCharging', encoding='utf8'))
except (TypeError, ValueError):
dragon_to_charge = 60
if not is_uno:
dragon_charging_ctrl = True if params.get('DragonChargingCtrl', encoding='utf8') == "1" else False
if dragon_charging_ctrl:
try:
dragon_to_discharge = int(params.get('DragonCharging', encoding='utf8'))
except (TypeError, ValueError):
dragon_to_discharge = 70
try:
dragon_to_charge = int(params.get('DragonDisCharging', encoding='utf8'))
except (TypeError, ValueError):
dragon_to_charge = 60
else:
dragon_charging_ctrl = False
dp_last_modified = modified
ts_last_update_vars = ts
+10 -2
View File
@@ -1,6 +1,14 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "common/util.h"
#include "common/timing.h"
#include "common/swaglog.h"
#include "common/touch.h"
#include "common/visionimg.h"
#include "common/params.h"
#include "ui.hpp"
static void ui_draw_sidebar_background(UIState *s, bool hasSidebar) {
@@ -57,7 +65,7 @@ static void ui_draw_sidebar_ip_addr(UIState *s, bool hasSidebar) {
const int network_ip_x = hasSidebar ? 58 : -(sbr_w);
const int network_ip_y = 255;
char network_ip_str[20];
char network_ip_str[15];
snprintf(network_ip_str, sizeof(network_ip_str), "%s", s->scene.ipAddr);
nvgFillColor(s->vg, COLOR_WHITE);
nvgFontSize(s->vg, 32);
@@ -91,7 +99,7 @@ static void ui_draw_sidebar_battery_icon(UIState *s, bool hasSidebar) {
static void ui_draw_sidebar_battery_text(UIState *s, bool hasSidebar) {
const int battery_img_h = 36;
const int battery_img_w = 76;
const int battery_img_w = 96;
const int battery_img_x = hasSidebar ? 150 : -(sbr_w);
const int battery_img_y = 305;