Fix some basic bugs in ZWO generation

This commit is contained in:
Rene Saarsoo 2020-09-25 12:21:25 +03:00
parent 98f882f9b8
commit 564faf95e7
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import { detectRepeats, RepeatedInterval } from "./detectRepeats";
const generateTextEvents = (comments: Comment[]): xml.XmlObject[] => { const generateTextEvents = (comments: Comment[]): xml.XmlObject[] => {
return comments.map(({ offset, text }) => ({ return comments.map(({ offset, text }) => ({
textevent: [{ _attr: { timeoffset: offset, message: text } }], textevent: [{ _attr: { timeoffset: offset.value, message: text } }],
})); }));
}; };
@ -20,7 +20,7 @@ const generateRangeInterval = (
_attr: { _attr: {
Duration: duration.value, Duration: duration.value,
PowerLow: intensity.from, PowerLow: intensity.from,
PowerHigh: intensity.from, PowerHigh: intensity.to,
...(cadence ? { Cadence: cadence } : {}), ...(cadence ? { Cadence: cadence } : {}),
}, },
}, },