forked from mawei/dp
1
0
Fork 0

fix driver camera AE and grey panda deprecation (#2426)

This commit is contained in:
Adeeb Shihadeh 2020-10-27 17:06:48 -07:00 committed by GitHub
parent 26bccbdcc8
commit 8369e11417
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 26 additions and 12 deletions

View File

@ -1,5 +1,6 @@
Version 0.7.10 (2020-10-26)
Version 0.7.10 (2020-10-29)
========================
* Grey panda is deprecated, upgrade to comma two or black panda
* NEOS update: update to Python 3.8.2 and lower CPU frequency
* Improved thermals due to reduced CPU frequency
* Update SNPE to 1.41.0

View File

@ -95,6 +95,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
fcw @79;
steerSaturated @80;
whitePandaUnsupported @81;
startupGreyPanda @82;
belowEngageSpeed @84;
noGps @85;
wrongCruiseMode @87;
@ -112,7 +113,6 @@ struct CarEvent @0x9b1657f34caf3ad3 {
calibrationProgressDEPRECATED @47;
invalidGiraffeHondaDEPRECATED @49;
canErrorPersistentDEPRECATED @83;
startupWhitePandaDEPRECATED @82;
focusRecoverActiveDEPRECATED @86;
neosUpdateRequiredDEPRECATED @88;
}

View File

@ -1,7 +1,7 @@
{
"ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-ba3ecb158edc760beda0d32e0eea4311031e460afa97fc180dc83f76cf512694.zip",
"ota_hash": "ba3ecb158edc760beda0d32e0eea4311031e460afa97fc180dc83f76cf512694",
"recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-e35dc1939dab4c6c2cbae3f225b07515f1a5c02afb232dc22e93f17c9840499f.img",
"ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-e85f507777cb6b22f88ba1c8be6bbaa2630c484b971344b645fca2d1c461cd47.zip",
"ota_hash": "e85f507777cb6b22f88ba1c8be6bbaa2630c484b971344b645fca2d1c461cd47",
"recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-db31ffe79dfd60be966fba6d1525a5081a920062b883644dc8f5734bcc6806bb.img",
"recovery_len": 15926572,
"recovery_hash": "e35dc1939dab4c6c2cbae3f225b07515f1a5c02afb232dc22e93f17c9840499f"
"recovery_hash": "db31ffe79dfd60be966fba6d1525a5081a920062b883644dc8f5734bcc6806bb"
}

View File

@ -27,8 +27,6 @@ function two_init {
[ -d "/proc/irq/733" ] && echo 3 > /proc/irq/733/smp_affinity_list # USB for LeEco
[ -d "/proc/irq/736" ] && echo 3 > /proc/irq/736/smp_affinity_list # USB for OP3T
# restrict unbound kworkers to first two cores
#find /sys/devices/virtual/workqueue -name cpumask -exec sh -c 'echo 3 > {}' ';'
# Check for NEOS update
if [ $(< /VERSION) != "$REQUIRED_NEOS_VERSION" ]; then

View File

@ -7,7 +7,7 @@ export OPENBLAS_NUM_THREADS=1
export VECLIB_MAXIMUM_THREADS=1
if [ -z "$REQUIRED_NEOS_VERSION" ]; then
export REQUIRED_NEOS_VERSION="15"
export REQUIRED_NEOS_VERSION="15-1"
fi
if [ -z "$PASSIVE" ]; then

View File

@ -293,7 +293,8 @@ void set_exposure_target(CameraState *c, const uint8_t *pix_ptr, bool front, int
uint8_t lum = pix_ptr[(y * b->yuv_width) + x];
lum_binning[lum]++;
} else {
const uint8_t *pix = &pix_ptr[y * b->rgb_width * 3 + x * 3];
// TODO: should get rid of RGB here
const uint8_t *pix = &pix_ptr[y * b->rgb_stride + x * 3];
unsigned int lum = (unsigned int)(pix[0] + pix[1] + pix[2]);
lum_binning[std::min(lum / 3, 255u)]++;
}

View File

@ -14,7 +14,7 @@ EventName = car.CarEvent.EventName
HwType = log.HealthData.HwType
def get_startup_event(car_recognized, controller_available):
def get_startup_event(car_recognized, controller_available, hw_type):
if comma_remote and tested_branch:
event = EventName.startup
else:
@ -24,6 +24,8 @@ def get_startup_event(car_recognized, controller_available):
event = EventName.startupNoCar
elif car_recognized and not controller_available:
event = EventName.startupNoControl
elif hw_type == HwType.greyPanda:
event = EventName.startupGreyPanda
return event

View File

@ -131,7 +131,7 @@ class Controls:
self.sm['dMonitoringState'].awarenessStatus = 1.
self.sm['dMonitoringState'].faceDetected = False
self.startup_event = get_startup_event(car_recognized, controller_available)
self.startup_event = get_startup_event(car_recognized, controller_available, hw_type)
if not sounds_available:
self.events.add(EventName.soundsUnavailable, static=True)

View File

@ -252,6 +252,14 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
},
EventName.startupGreyPanda: {
ET.PERMANENT: Alert(
"WARNING: Grey panda is deprecated",
"Upgrade to comma two or black panda",
AlertStatus.userPrompt, AlertSize.mid,
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
},
EventName.invalidGiraffeToyota: {
ET.PERMANENT: Alert(
"Unsupported Giraffe Configuration",

View File

@ -59,6 +59,10 @@ static void handle_display_state(UIState *s, bool user_input) {
int display_mode = s->awake ? HWC_POWER_MODE_NORMAL : HWC_POWER_MODE_OFF;
LOGW("setting display mode %d", display_mode);
framebuffer_set_power(s->fb, display_mode);
if (s->awake) {
system("service call window 18 i32 1");
}
}
}