Fix: access TaskRecord::data_record vector after TaskData refactor

Commit e21b2af changed TaskShm map value from DataRecord (flat array)
to TaskRecord (struct wrapping shm_vector_f), but three call sites in
exp_base.cpp didn't drill into the .data_record member — they called
size()/operator[]/push_back() on TaskRecord itself, which has none.
This commit is contained in:
Huamonarch 2026-05-13 09:15:20 +08:00
parent 2c62f9c4a3
commit 0a5397345c

View File

@ -198,7 +198,8 @@ std::vector<AlarmInfo> ExpBase::exec_task(mix_cc::time_range_t time_range) {
logger_->Debug() << "task_seq:" << task_seq << std::endl;
auto &data_record = TaskShm::TaskRecordPtr.get()
->
operator[](exp_type_ * 1000 + task_seq);
operator[](exp_type_ * 1000 + task_seq)
.data_record;
logger_->Debug() << "dataSize:" << data_record.size() << std::endl;
for (size_t j = 0; j < data_record.size(); j++) {
double dataJ = data_record[j];
@ -1363,7 +1364,7 @@ void ExpBase::task_mon_pro() {
TaskShm::TaskRecordPtr.get()
->
operator[](exp_type_ * 1000 + task_seq)
.push_back(res.value);
.data_record.push_back(res.value);
this->sta_ptr_->running_stat_add(res.value);
}
}