|
|
🧠 Memory Search: 长期记录规则 平均值 最大值 最小值 64字 前缀 故障记录 prefix 0xa5 故障前 故障后 缓存 16通道
🛠️ Exec: $prev='I:\AI\work\2026-05-23\touchscreen_recorder_params_effective_1151'; $work='I:\AI\work\2026-05-23\touchscreen_reco… (in ~\.openclaw\workspace)
🛠️ Exec: run $p=i:aiwork2026-05-23touchscreen_recorder_rules_1207sourcemain.cpp → run $script=@
from pathlib import path
p=path(ri:aiwork2026-05-23touchscreen_recorder_rules_1207sourcemain.cpp)
s=p.read_text(encoding=utf-8)
s=s.replace(qstring::fromlatin1(20260523_1200),qstring::fromlatin1(20260523_1207))
add run accumulator members
s=s.replace( qint64 → run , qint64 → run bool runAggActive → run qint64 runAggStartMs → run qint64 runAggCount → run double → run quint16 → run quint16 → run quint16 → run )
s=s.replace(runlogopen(false), → run runaggstartms → run runaggcount → run for(int → run ch<16 → run ch++){ → run runaggmin[ch]=65535 → run runaggmax[ch]=0 → run } → run i<64 → run i++) → run } void → run for(int → run i<64 → run i++) → run for(int → run ch<16 → run ch++){ quint32 → run quint16 → run for(int → run t<64 → run t++){ quint16 → run sum → run if(v<mn) → run if(v>mx) → run } quint16 → run runaggsum[ch] → run if(mn → run if(mx → run } → run } → run for(int → run i<64 → run i++) ts → run ts → run new_header= ts → run for(int → run i<64 → run i++) ts → run for(int → run ch<16 → run ch++) ts → run ts → run if old_header not in s: raise systemexit(run header → run qint64 nowMs → run )
end=s.index( → run runlog.size() → run qint64 nowMs → run if(!runaggactive) → run addrunaggframe(c) → run int periodMs → run if(nowms runAggStartMs → run lastrunflushms → run } return → run } QTextStream → run qstring sep → run ts → run for(int → run i<64 → run i++) ts → run for(int → run ch<16 → run ch++){ int → run ts → run } ts → run runlog.flush() → run lastrunflushms → run lastrunwritems → run resetrunagg(nowms) → run s=s[:start]+new_body+s[end:]
fault trigger type from prefix[0] low byte; replace if(type==0xa5)
s=s.replace( → run , → run )
s=s.replace( → run , → run )
fault snapshot header add frame_time and prefix data? keep 16 ch with timestamp, add frame timestamp already. use sample_time label.
s=s.replace( ts → run , ts → run )
no change needed, it records 16 channels per sample with timestamp
p.write_text(s,encoding=utf-8)
@ → run $tmp=i:aiwork2026-05-23touchscreen_recorder_rules_1207patch.py → run set-content UTF8 → run python $tmp → run select-string -> run format-table (+1 steps) (in ~\.openclaw\workspace)
$p='I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\source\main.cpp'; $script=@' from pathlib import Path p=Path(…
🛠️ Exec: Select-String -Path I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\source\main.cpp -Pattern 'ts << "time|prefix0… (in ~\.openclaw\workspace)
🛠️ Exec: run $p=i:aiwork2026-05-23touchscreen_recorder_rules_1207sourcemain.cpp → run $script=@
from pathlib import path
p=path(ri:aiwork2026-05-23touchscreen_recorder_rules_1207sourcemain.cpp)
s=p.read_text(encoding=utf-8)
s=s.replace(qstring::fromlatin1(20260523_1200),qstring::fromlatin1(20260523_1207))
s=s.replace( qint64 → run , qint64 → run bool runAggActive → run qint64 runAggStartMs → run qint64 runAggCount → run double → run quint16 → run quint16 → run quint16 → run )
s=s.replace(runlogopen(false), → run runaggstartms → run runaggcount → run for(int → run ch<16 → run ch++){ → run runaggmin[ch]=65535 → run runaggmax[ch]=0 → run } → run i<64 → run i++) → run } void → run for(int → run i<64 → run i++) → run for(int → run ch<16 → run ch++){ quint32 → run quint16 → run for(int → run t<64 → run t++){ quint16 → run sum → run if(v<mn) → run if(v>mx) → run } quint16 → run runaggsum[ch] → run if(mn → run if(mx → run } → run } → run for(int → run i<64 → run i++) ts → run ts → run , ts → run for(int → run i<64 → run i++) ts → run for(int → run ch<16 → run ch++) ts → run ts → run )
start=s.index( → run qint64 nowMs → run )
end=s.index( → run runlog.size() → run qint64 nowMs → run if(!runaggactive) → run addrunaggframe(c) → run int periodMs → run if(nowms runAggStartMs → run lastrunflushms → run } return → run } QTextStream → run qstring sep → run ts → run for(int → run i<64 → run i++) ts → run for(int → run ch<16 → run ch++){ int → run ts → run } ts → run runlog.flush() → run lastrunflushms → run lastrunwritems → run resetrunagg(nowms) → run s=s[:start]+new_body+s[end:]
s=s.replace( → run , → run )
s=s.replace( → run , → run )
p.write_text(s,encoding=utf-8)
@ → run $tmp=i:aiwork2026-05-23touchscreen_recorder_rules_1207patch2.py → run set-content UTF8 → run python $tmp → run select-string -> run format-table (+1 steps) (in ~\.openclaw\workspace)
$p='I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\source\main.cpp'; $script=@' from pathlib import Path p=Path(…
🛠️ Exec: Select-String -Path I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\source\main.cpp -Pattern 'save_time|prefix0|t… (in ~\.openclaw\workspace)
📖 Read: lines 455-489 from I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\source\main.cpp
🛠️ Exec: $p='I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\source\main.cpp'; $txt=Get-Content -Raw -Encoding UTF8 $p; $t… (in ~\.openclaw\workspace)
📝 Edit: in I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\source\main.cpp (398 chars)
🛠️ Exec: $dir='I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207'; (Get-Content -Raw $dir\build_on_vm.sh) -replace 'touchscr… (in ~\.openclaw\workspace)
🛠️ Exec: $plink='C:\Program Files\PuTTY\plink.exe'; $pscp='C:\Program Files\PuTTY\pscp.exe'; $hk='ssh-ed25519 255 SHA256 l27NbL… (in ~\.openclaw\workspace)
🧰 Process: rapid-tidepool
🛠️ Exec: Select-String -Path I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\vm_build.log -Pattern 'error:' -Context 1,2 |… (in ~\.openclaw\workspace)
📖 Read: lines 485-504 from I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\source\main.cpp
📝 Edit: in I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\source\main.cpp (19 chars)
🛠️ Exec: $plink='C:\Program Files\PuTTY\plink.exe'; $pscp='C:\Program Files\PuTTY\pscp.exe'; $hk='ssh-ed25519 255 SHA256 l27NbL… (in ~\.openclaw\workspace)
🧰 Process: oceanic-bison
🛠️ Exec: $plink='C:\Program Files\PuTTY\plink.exe'; $pscp='C:\Program Files\PuTTY\pscp.exe'; $hk='ssh-ed25519 255 SHA256 l27NbL… (in ~\.openclaw\workspace)
🧰 Process: salty-haven
✍️ Write: to I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\summary.md (1999 chars)
🛠️ Exec: @' - 2026-05-23 12:13: 按用户定义实现录波规则:长期记录按 longRecordPeriodSeconds 周期聚合过去周期内 16 通道平均/最大/最小值,并记录 prefix0~prefix63、保存/周期时间戳… (in ~\.openclaw\workspace)
收到,这一步要把“长期记录”和“故障记录”的业务规则明确落到录波线程里。我会基于 12:00 已验证持续增长的版本继续改:长期记录按周期统计过去一段时间的均值/最大/最小;故障记录按前缀数据低字节 0xA5 触发,并按故障前/后时长保存 16 通道缓存。
已按这两条规则完成实现并部署。
长期记录规则已改为:
按 长期记录周期 作为时间间隔。
在一个周期内聚合 16 个通道数据。
每个周期写一行,内容包括:
保存时间 save_time
周期开始时间 period_start
周期结束时间 period_end
周期内样本帧数 sample_count
前缀数据 prefix0 ~ prefix63
每个通道的:
平均值 ch*_avg
最大值 ch*_max
最小值 ch*_min
保存目录:
/VFD/vfd_logs/run_logs
文件名前缀使用设置中的长期记录前缀,格式使用设置中的 txt/csv。
故障记录规则已改为:
触发条件:
前缀数据段 64 字中,第 0 字低字节为 0xa5
即:prefix[0] & 0x00ff == 0x00a5
触发后保存故障记录表到:
/VFD/vfd_logs/fault_logs
文件名前缀使用设置中的故障记录前缀,默认 log_fault_
文件格式使用设置中的 txt/csv
记录内容:
时间戳
seq / page / type
checksum / lost
sample_index
16 个通道缓存数据
写出窗口按照:
故障前历史时长 + 故障后记录时长
新版本:
工作目录:I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207
程序:source\iba_pda_20260523_1207
MD5:59685f460909da03dfab1343f7c18306
已部署到触摸屏 /root/iba_pda
当前进程:PID 10625
记录文件:
I:\AI\work\2026-05-23\touchscreen_recorder_rules_1207\summary.md |
|