.pvs chart editorTinyC .pvs-Diagramm-EditorLook at and change the stored data of a TinyC programDie gespeicherten Daten eines TinyC-Programms ansehen und ändern
With this tool you can look at the stored data of a TinyC program and change it, for example a wrong bar in the day chart or a wrong start reading.
▶ Open the online editor, or download tinyc_chart_editor.html and open it on your PC. It is a single file. Nothing is uploaded anywhere, everything happens in your browser.
Each TinyC program keeps its data in a file with the ending .pvs (for /sml_chart.tcb that is /sml_chart.pvs). It contains the chart history, the start readings and the settings, everything that survives a restart. You download and upload it in the file manager of your device: http://<device>/ufsd.
Coming from an old Scripter script? Then use the converter.
Mit diesem Werkzeug kannst du die gespeicherten Daten eines TinyC-Programms ansehen und ändern, zum Beispiel einen falschen Balken im Tagesdiagramm oder einen falschen Anfangsstand.
▶ Online-Editor öffnen, oder tinyc_chart_editor.html herunterladen und auf deinem PC öffnen. Es ist eine einzelne Datei. Es wird nichts irgendwohin hochgeladen, alles passiert in deinem Browser.
Jedes TinyC-Programm speichert seine Daten in einer Datei mit der Endung .pvs (zu /sml_chart.tcb gehört /sml_chart.pvs). Darin stehen der Diagrammverlauf, die Anfangsstände und die Einstellungen, also alles, was einen Neustart übersteht. Herunter- und hochladen kannst du sie im Dateimanager deines Geräts: http://<geraet>/ufsd.
Du kommst von einem alten Scripter-Script? Dann nimm den Konverter.
.pvs in the file manager of your device and drag it into the editor..pvs and put it back:
Keep this order. If the program is still running, it writes its own values over yours when it stops.
Did you change a start reading, the day of the month or a setting? The program takes these from the tc_options.cfg at start-up, not from the .pvs. So upload the tc_options.cfg as well, see below. The editor reminds you of this when saving.
If you do not change anything, the file stays exactly the same. Values the editor does not know are kept as they are.
.pvs im Dateimanager deines Geräts herunterladen und in den Editor ziehen..pvs herunterladen und zurückspielen:
Halte diese Reihenfolge ein. Läuft das Programm noch, schreibt es beim Stoppen seine eigenen Werte über deine.
Hast du einen Anfangsstand, den Monatstag oder eine Einstellung geändert? Die holt sich das Programm beim Start aus der tc_options.cfg, nicht aus der .pvs. Lade also die tc_options.cfg mit hoch, siehe unten. Der Editor erinnert dich beim Speichern daran.
Änderst du nichts, bleibt die Datei genau gleich. Werte, die der Editor nicht kennt, bleiben unverändert.
tc_options.cfgAll TinyC programs share the file /tc_options.cfg. It holds the language, meter, pins, emulator settings and the start readings, so they are kept when you change the program. At start-up the program takes these values from tc_options.cfg, not from the .pvs. A value you only change in the .pvs is therefore back to the old one a second after the start.
This concerns these values:
.pvs | tc_options.cfg |
|---|---|
sml_dval · sml_mval · sml_yval | imp_day · imp_month · imp_year |
sml_dval2 · sml_mval2 · sml_yval2 | exp_day · exp_month · exp_year |
sml_wval · sml_wval2 | imp_week · exp_week |
sml_virt_out | exp_virt (here the higher of the two values wins) |
sml_stmin · sml_chmain | chart_short · chart_onmain |
sml_da, ui_*, sml_* settings, mb_*, es_*, ct_* | same name |
The editor has its own box for this. Load the tc_options.cfg of your device there. The table shows the value from the .pvs and from the cfg next to each other and marks where they differ. If you change such a value in the .pvs, it is copied into the box automatically, or you type the new value there directly. Download only changes these lines and keeps everything else, including the settings of programs that are not running right now. Upload it together with the .pvs, with the program stopped.
Alle TinyC-Programme teilen sich die Datei /tc_options.cfg. Darin stehen Sprache, Zähler, Pins, Emulator-Einstellungen und die Anfangsstände, damit sie beim Programmwechsel erhalten bleiben. Beim Start nimmt das Programm diese Werte aus der tc_options.cfg, nicht aus der .pvs. Ein Wert, den du nur in der .pvs änderst, steht deshalb eine Sekunde nach dem Start wieder auf dem alten.
Das betrifft diese Werte:
.pvs | tc_options.cfg |
|---|---|
sml_dval · sml_mval · sml_yval | imp_day · imp_month · imp_year |
sml_dval2 · sml_mval2 · sml_yval2 | exp_day · exp_month · exp_year |
sml_wval · sml_wval2 | imp_week · exp_week |
sml_virt_out | exp_virt (hier gewinnt der höhere der beiden Werte) |
sml_stmin · sml_chmain | chart_short · chart_onmain |
sml_da, ui_*, sml_*-Einstellungen, mb_*, es_*, ct_* | gleicher Name |
Der Editor hat dafür einen eigenen Kasten. Lade dort die tc_options.cfg deines Geräts. Die Tabelle zeigt den Wert aus der .pvs und aus der cfg nebeneinander und markiert, wo sie sich unterscheiden. Änderst du so einen Wert in der .pvs, wird er automatisch in den Kasten übernommen, oder du trägst den neuen Wert dort direkt ein. Herunterladen ändert nur diese Zeilen und lässt alles andere stehen, auch die Einstellungen von Programmen, die gerade nicht laufen. Zusammen mit der .pvs hochladen, während das Programm gestoppt ist.
.pvs fileFür Fortgeschrittene: die .pvs-DateiThe current format PVS3 stores every value under its name. There is no checksum:
'P' 'V' '3' count:u8
per entry: nameLen:u8 name:nameLen slotCount:u16 LE data:slotCount*4 LE
The older format PVS2 ('P','V','H', layout_hash:u32, a number instead of the name) is also read and written back in the same format. Its hash only covers the layout, not the values, so changing values keeps it valid.
The device is tolerant when loading: unknown names are skipped, a missing value keeps its current value, a value that is too short is loaded as far as it goes.
Das aktuelle Format PVS3 speichert jeden Wert unter seinem Namen. Eine Prüfsumme gibt es nicht:
'P' 'V' '3' count:u8
je Eintrag: nameLen:u8 name:nameLen slotCount:u16 LE data:slotCount*4 LE
Das ältere Format PVS2 ('P','V','H', layout_hash:u32, eine Nummer statt des Namens) wird auch gelesen und im selben Format zurückgeschrieben. Sein Hash umfasst nur den Aufbau, nicht die Werte, Änderungen an Werten lassen ihn also gültig.
Das Gerät ist beim Laden tolerant: Unbekannte Namen werden übersprungen, ein fehlender Wert behält seinen aktuellen Wert, ein zu kurzer wird so weit geladen, wie er reicht.
Every slot in the file has 4 bytes. How they have to be read is not in the file, only the program knows it. The editor knows the values of the SML programs:
| Name | Type | Values |
|---|---|---|
sml_s4h, sml_s24h | int16 | 481 / 1441 |
sml_dcon, sml_dprod | float | 31 each |
sml_mcon, sml_mprod | float | 12 each |
sml_wcon, sml_wprod | float | 53 each (week 1 = index 0) |
sml_s4h_pos, sml_s24h_pos, sml_da | int32 | 1 |
sml_dval, sml_wval, sml_mval, sml_yval and the same with 2, sml_virt_out | float | 1 |
sml_stmin, sml_chmain, sml_pv, sml_sndpwr, sml_meter_sel … ui_*, mb_*, es_*, ct_* | int32 | 1 |
ct_mac, ct_mail | byte | 16 / 64 |
int16 holds two values per slot, byte four.
Values the editor does not know are shown as float, or as int32 if they would make no sense as float. You can change the type for each value, so the editor also works for other TinyC programs.
Jeder Platz in der Datei hat 4 Bytes. Wie sie gelesen werden müssen, steht nicht in der Datei, das weiß nur das Programm. Der Editor kennt die Werte der SML-Programme:
| Name | Typ | Werte |
|---|---|---|
sml_s4h, sml_s24h | int16 | 481 / 1441 |
sml_dcon, sml_dprod | float | je 31 |
sml_mcon, sml_mprod | float | je 12 |
sml_wcon, sml_wprod | float | je 53 (Woche 1 = Index 0) |
sml_s4h_pos, sml_s24h_pos, sml_da | int32 | 1 |
sml_dval, sml_wval, sml_mval, sml_yval und dasselbe mit 2, sml_virt_out | float | 1 |
sml_stmin, sml_chmain, sml_pv, sml_sndpwr, sml_meter_sel … ui_*, mb_*, es_*, ct_* | int32 | 1 |
ct_mac, ct_mail | byte | 16 / 64 |
int16 hält zwei Werte pro Platz, byte vier.
Werte, die der Editor nicht kennt, zeigt er als float, oder als int32, wenn sie als float keinen Sinn ergeben würden. Den Typ kannst du für jeden Wert umstellen. So geht der Editor auch für andere TinyC-Programme.
.bin fileFür Fortgeschrittene: die .bin-DateiThe editor can also read and write a .bin. That file is only for importing: the program reads it once at start-up, takes the data over into the .pvs and deletes it. It holds the values as plain float32, without a header:
| File | Contents | without | with start readings | + weeks |
|---|---|---|---|---|
sml_chart.bin | sml_s4h · sml_s24h · sml_dcon · sml_mcon | 1965 | 1969 | 2023 |
sml_chart_pv.bin | sml_dprod · sml_mprod | 43 | 46 | 100 |
The start readings and the week block are only written when they are complete.
Normally the .pvs is the better way, because it contains all values. In both cases the start readings must also go into the tc_options.cfg. When you load a .bin with start readings, the editor puts them into that box automatically.
Der Editor kann auch eine .bin lesen und schreiben. Diese Datei ist nur zum Importieren da: Das Programm liest sie beim Start einmal, übernimmt die Daten in die .pvs und löscht sie. Sie enthält die Werte als einfache float32, ohne Kopf:
| Datei | Inhalt | ohne | mit Anfangsständen | + Wochen |
|---|---|---|---|---|
sml_chart.bin | sml_s4h · sml_s24h · sml_dcon · sml_mcon | 1965 | 1969 | 2023 |
sml_chart_pv.bin | sml_dprod · sml_mprod | 43 | 46 | 100 |
Die Anfangsstände und der Wochenblock werden nur geschrieben, wenn sie vollständig sind.
Normalerweise ist die .pvs der bessere Weg, weil sie alle Werte enthält. In beiden Fällen müssen die Anfangsstände zusätzlich in die tc_options.cfg. Lädst du eine .bin mit Anfangsständen, übernimmt der Editor sie automatisch in diesen Kasten.