remove console.log and comments
This commit is contained in:
parent
2a7fa0eaef
commit
4f2cfd032a
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 = [];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue