xlua: grid helper script shouldn't use bad QSOs for points & mults

They should, however, be included in all QSOs list.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
1 files changed, 10 insertions(+), 4 deletions(-)

M xlua/scripts/helper-grid.lua
M xlua/scripts/helper-grid.lua +10 -4
@@ 79,9 79,18 @@ local function export_prep(self, qpoints
 
 		local tx_exch, tx_exch_ok = qexchange(qso.tx, tx)
 		local rx_exch, rx_exch_ok = qexchange(qso.rx, rx)
+		local exch_ok = tx_exch_ok and rx_exch_ok
+
+		-- add to list of all qsos
+		table.insert(all, { qso, tx_exch, rx_exch, exch_ok })
+
+		-- if the exchange is bad, then there are no points/mults/etc.
+		if not exch_ok then
+			return
+		end
 
 		-- accumulate points
-		if not self:is_dup(qso, tx, rx) and tx_exch_ok and rx_exch_ok then
+		if not self:is_dup(qso, tx, rx) then
 			points[1] = points[1] + qpoints(qso, tx, rx)
 		end
 

          
@@ 91,9 100,6 @@ local function export_prep(self, qpoints
 			mults:add(m)
 		end
 
-		-- add to list of all QSOs
-		table.insert(all, { qso, tx_exch, rx_exch, tx_exch_ok and rx_exch_ok })
-
 		-- stash for future dup detection
 		self:qso_load(qso, tx, rx)