mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 02:52:04 +08:00
read bool param with read_db_bool (#2205)
* read bool param with read_db_bool * Update selfdrive/loggerd/loggerd.cc Co-authored-by: Willem Melching <willem.melching@gmail.com> Co-authored-by: Willem Melching <willem.melching@gmail.com> old-commit-hash: 0e5a5efffce15cc507d8104aceb58c132689d7c8
This commit is contained in:
@@ -113,8 +113,7 @@ void encoder_thread(bool is_streaming, bool raw_clips, int cam_idx) {
|
||||
if (cam_idx == CAM_IDX_DCAM) {
|
||||
// TODO: add this back
|
||||
#ifndef QCOM2
|
||||
std::vector<char> value = read_db_bytes("RecordFront");
|
||||
if (value.size() == 0 || value[0] != '1') return;
|
||||
if (!read_db_bool("RecordFront")) return;
|
||||
LOGW("recording front camera");
|
||||
#endif
|
||||
set_thread_name("FrontCameraEncoder");
|
||||
@@ -461,8 +460,7 @@ kj::Array<capnp::word> gen_init_data() {
|
||||
init.setGitRemote(capnp::Text::Reader(git_remote.data(), git_remote.size()));
|
||||
}
|
||||
|
||||
std::vector<char> passive = read_db_bytes("Passive");
|
||||
init.setPassive(passive.size() > 0 && passive[0] == '1');
|
||||
init.setPassive(read_db_bool("Passive"));
|
||||
{
|
||||
// log params
|
||||
std::map<std::string, std::string> params;
|
||||
|
||||
@@ -43,10 +43,7 @@ ParamsToggle::ParamsToggle(QString param, QString title, QString description, QS
|
||||
|
||||
setLayout(hlayout);
|
||||
|
||||
auto p = read_db_bytes(param.toStdString().c_str());
|
||||
if (p.size()){
|
||||
checkbox->setChecked(p[0] == '1');
|
||||
}
|
||||
checkbox->setChecked(read_db_bool(param.toStdString().c_str()));
|
||||
|
||||
setStyleSheet(R"(
|
||||
QCheckBox { font-size: 70px }
|
||||
|
||||
Reference in New Issue
Block a user