* fix camera app bug

This commit is contained in:
lxowalle
2025-08-20 17:39:57 +08:00
parent ebf0e14009
commit e2517649e2
2 changed files with 7 additions and 0 deletions

View File

@@ -376,6 +376,9 @@ namespace maix::camera
std::vector<int> get_sensor_size()
{
if (__sensor_size.size() == 0) {
__get_global_info();
}
return __sensor_size;
}

View File

@@ -336,7 +336,11 @@ int app_base_init(void)
}
}
log::info("light_io: %s", light_io.c_str());
#if PLATFORM_MAIXCAM2
pinmap::set_pin_function(light_io, "GP" + light_io);
#else
pinmap::set_pin_function(light_io, "GPIO" + light_io);
#endif
priv.light = new gpio::GPIO(light_io, gpio::Mode::OUT);
err::check_null_raise(priv.light, "light gpio open failed");
priv.light->low();