Skip to content

Commit

Permalink
fixed lat / lon values passed to isDuringDaylight
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattk70 committed Nov 5, 2023
1 parent a2087c1 commit a98811b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ const terminateWorkers = () => {
}

const insertRecord = async (timestamp, key, speciesID, confidence, file) => {
const isDaylight = isDuringDaylight(timestamp, metadata[file].latitude, metadata[file].longitude)
const isDaylight = isDuringDaylight(timestamp, STATE.lat, STATE.lon);
let changes, fileID;
confidence = Math.round(confidence);
const db = memoryDB; //STATE.db;
Expand Down Expand Up @@ -1704,7 +1704,7 @@ const onInsertManualRecord = async ({ cname, start, end, comment, count, file, l

let response;
const dateTime = fileStart + startMilliseconds;
const isDaylight = isDuringDaylight(dateTime, metadata[file].latitude, metadata[file].longitude)
const isDaylight = isDuringDaylight(dateTime, STATE.lat, STATE.lon);
response = await db.runAsync('INSERT OR REPLACE INTO records VALUES ( ?,?,?,?,?,?,?,?,?,?)',
dateTime, start, fileID, speciesID, 2000, label, comment, end, parseInt(count), isDaylight);

Expand Down

0 comments on commit a98811b

Please sign in to comment.