681-i!Voting Problem with Incorrect Votes Displayed
Technical Support Guide
Table of Contents
Brand:
- AMX
Models:
- i!Vote
Overview:
When an individual station (CP4 touch panel) makes a vote and locks it, the correct vote is listed on the TPI3 display, and that result is sent in as that station's vote (correct so far). If while the overall vote is still in progress, a station (that has already locked in their vote) presses another external button, (Yes/No/Abstain etc) the TPI3 changes that person's vote to the public display (on the TPI3). The tally results are correct on the TPI3, but the individual vote may not be correct. It may show a different vote for a member than what was recorded by the voting system. The result that was locked in by the member is what is recorded and tallied, but the TPI3 will show the last button pressed by the user as the vote for that member. If they press a different vote button after their vote has been submitted, that button will change the TPI3 display of their vote.
Solution:
This is a confirmed bug in the existing release of i!-Voting (v1.1.7). It can be fixed in the open source file "i!-VotingTouchPanelStationMod.axs". At the bottom of mainline in this module is the code that handles the SUBMIT_VOTE, when pressing and holding a vote button to register/lock your vote. This code is missing the lock mechanism that prevents re-voting. Replace this code with the sample below to fix this issue in the field. This bug is only exposed when using a touch panel with external buttons. When using a normal touch panel, after submitting a vote, the page is closed, and you can't submit another vote. The MSP module works correctly. This fix will be included in the next release of i!-Voting.
Sample Code:
Existing Code
//------------------------------------------------//STATION VOTE BUTTON HOLD EVENT //--------------------------------------------------------------------------------- IF(sStation.nStationVoteHoldCounter[nFeedbackLoop] > 0)
{
//Increment vote hold counter
sStation.nStationVoteHoldCounter[nFeedbackLoop] = (sStation.nStationVoteHoldCounter[nFeedbackLoop] + 1)
//If we have reached maximum hold count then submit vote
IF(sStation.nStationVoteHoldCounter[nFeedbackLoop] >= nMAX_VOTE_HOLD_COUNT) {
//Submit vote i!-Voting to Virtual Device SUBMIT_VOTE(nFeedbackLoop,sStation.nStationVoteSelected[nFeedbackLoop])
}
}
//---------------------------------------------------------------------------------
Modified Code (Replaces Existing Code)
//------------------------------------------------ //STATION VOTE BUTTON HOLD EVENT //--------------------------------------------------------------------------------- IF(sStation.nStationVoteHoldCounter[nFeedbackLoop] > 0)
{
//Increment vote hold counter
sStation.nStationVoteHoldCounter[nFeedbackLoop] = (sStation.nStationVoteHoldCounter[nFeedbackLoop] + 1)
//If we have reached maximum hold count then submit vote
IF(sStation.nStationVoteHoldCounter[nFeedbackLoop] >= nMAX_VOTE_HOLD_COUNT) {
//Prevent station vote if already voted
IF(!(sStation.nStationVoteLocked[nFeedbackLoop])) {
//Lock Vote
ON[sStation.nStationVoteLocked[nFeedbackLoop]]
//Submit vote i!-Voting to Virtual Device
SUBMIT_VOTE(nFeedbackLoop,sStation.nStationVoteSelected[nFeedbackLoop])
}
}
}
//---------------------------------------------------------------------------------
Table of Contents