remove console.log and comments

This commit is contained in:
Alex Moreno 2024-05-31 11:57:38 +02:00
parent 2a7fa0eaef
commit 4f2cfd032a
2 changed files with 4 additions and 22 deletions

View File

@ -1,10 +1,4 @@
import con from '../db/connect.js';
export default async data => { export default async data => {
const palletFkFinding = 0;
const attempt = 0;
const sensitivity = null;
data = data.toString(); data = data.toString();
const crudeRfids = data.split('\n'); const crudeRfids = data.split('\n');
@ -21,7 +15,7 @@ export default async data => {
epcHex = epcHex.replace(RFID_PREFIX, ''); epcHex = epcHex.replace(RFID_PREFIX, '');
epcHex = epcHex.substring(0, 1) == 0 ? epcHex.substring(1) : epcHex; epcHex = epcHex.substring(0, 1) == 0 ? epcHex.substring(1) : epcHex;
// console.log(jsonResult);
const rfidParsed = { const rfidParsed = {
code: parseInt(epcHex), code: parseInt(epcHex),
created: jsonResult.timestamp, created: jsonResult.timestamp,
@ -30,19 +24,7 @@ export default async data => {
antenna: jsonResult.tagInventoryEvent.antennaPort, antenna: jsonResult.tagInventoryEvent.antennaPort,
transmitPowerCdbm: jsonResult.tagInventoryEvent.transmitPowerCdbm transmitPowerCdbm: jsonResult.tagInventoryEvent.transmitPowerCdbm
}; };
// await con.query(`
// INSERT INTO vn.rfidTest (palletFk, expeditionFk, peakRssi, antenna, attempt, power, sensitivity)
// VALUES(?, ?, ?, ?, ?, ?, ?);
// `, [
// palletFkFinding,
// rfidParsed.code,
// rfidParsed.peakRssi,
// rfidParsed.antenna,
// attempt,
// jsonResult.tagInventoryEvent.transmitPowerCdbm,
// sensitivity
// ]);
// console.log(rfidParsed);
rfidsParsedExtended.push(rfidParsed); rfidsParsedExtended.push(rfidParsed);
rfidsParsed.add(rfidParsed.code); rfidsParsed.add(rfidParsed.code);
} }

View File

@ -39,8 +39,8 @@ export default async(conf, cb) => {
function createPallet() { function createPallet() {
clearTimeout(interval); clearTimeout(interval);
// if (!conf.minimum || rfidbuffer.size > conf.minimum) if (!conf.minimum || rfidbuffer.size > conf.minimum)
// newPallet(rfidbuffer, conf.arcId); newPallet(rfidbuffer, conf.arcId);
rfidbuffer = new Set(); rfidbuffer = new Set();
rfidbufferExtend = []; rfidbufferExtend = [];
} }