5144-improveArc #5
|
@ -1,10 +1,4 @@
|
|||
import con from '../db/connect.js';
|
||||
|
||||
export default async data => {
|
||||
const palletFkFinding = 0;
|
||||
const attempt = 0;
|
||||
const sensitivity = null;
|
||||
|
||||
data = data.toString();
|
||||
const crudeRfids = data.split('\n');
|
||||
|
||||
|
@ -21,7 +15,7 @@ export default async data => {
|
|||
|
||||
epcHex = epcHex.replace(RFID_PREFIX, '');
|
||||
epcHex = epcHex.substring(0, 1) == 0 ? epcHex.substring(1) : epcHex;
|
||||
// console.log(jsonResult);
|
||||
|
||||
const rfidParsed = {
|
||||
code: parseInt(epcHex),
|
||||
created: jsonResult.timestamp,
|
||||
|
@ -30,19 +24,7 @@ export default async data => {
|
|||
antenna: jsonResult.tagInventoryEvent.antennaPort,
|
||||
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);
|
||||
rfidsParsed.add(rfidParsed.code);
|
||||
}
|
||||
|
|
|
@ -39,8 +39,8 @@ export default async(conf, cb) => {
|
|||
function createPallet() {
|
||||
clearTimeout(interval);
|
||||
|
||||
// if (!conf.minimum || rfidbuffer.size > conf.minimum)
|
||||
// newPallet(rfidbuffer, conf.arcId);
|
||||
if (!conf.minimum || rfidbuffer.size > conf.minimum)
|
||||
newPallet(rfidbuffer, conf.arcId);
|
||||
rfidbuffer = new Set();
|
||||
rfidbufferExtend = [];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue