@@ -34,6 +34,7 @@ var config = {
3434 "readertype" : 1 ,
3535 "wgd0pin" : 4 ,
3636 "wgd1pin" : 5 ,
37+ "rdm6300pin" : 4 ,
3738 "sspin" : 0 ,
3839 "rfidgain" : 32 ,
3940 "wifipin" : 255 ,
@@ -149,21 +150,40 @@ function syncBrowserTime() {
149150
150151function handleReader ( ) {
151152 var rType = parseInt ( document . getElementById ( "readertype" ) . value ) ;
152- if ( rType === 0 || rType === 4 ) {
153+ if ( rType === 0 ) {
153154 document . getElementById ( "wiegandForm" ) . style . display = "none" ;
154155 document . getElementById ( "mfrc522Form" ) . style . display = "block" ;
155156 document . getElementById ( "rc522gain" ) . style . display = "block" ;
156- } else if ( rType === 1 || rType === 5 ) {
157+ document . getElementById ( "rdm6300" ) . style . display = "none" ;
158+ } else if ( rType === 1 ) {
157159 document . getElementById ( "wiegandForm" ) . style . display = "block" ;
158160 document . getElementById ( "mfrc522Form" ) . style . display = "none" ;
159- } else if ( rType === 2 || rType === 6 ) {
161+ document . getElementById ( "rdm6300" ) . style . display = "none" ;
162+ } else if ( rType === 2 ) {
160163 document . getElementById ( "wiegandForm" ) . style . display = "none" ;
161164 document . getElementById ( "mfrc522Form" ) . style . display = "block" ;
162165 document . getElementById ( "rc522gain" ) . style . display = "none" ;
166+ document . getElementById ( "rdm6300" ) . style . display = "none" ;
163167 } else if ( rType === 3 ) {
164168 document . getElementById ( "wiegandForm" ) . style . display = "none" ;
165169 document . getElementById ( "mfrc522Form" ) . style . display = "none" ;
166170 document . getElementById ( "rc522gain" ) . style . display = "none" ;
171+ document . getElementById ( "rdm6300" ) . style . display = "block" ;
172+ } else if ( rType === 4 ) {
173+ document . getElementById ( "wiegandForm" ) . style . display = "none" ;
174+ document . getElementById ( "mfrc522Form" ) . style . display = "block" ;
175+ document . getElementById ( "rc522gain" ) . style . display = "none" ;
176+ document . getElementById ( "rdm6300" ) . style . display = "block" ;
177+ } else if ( rType === 5 ) {
178+ document . getElementById ( "wiegandForm" ) . style . display = "block" ;
179+ document . getElementById ( "mfrc522Form" ) . style . display = "none" ;
180+ document . getElementById ( "rc522gain" ) . style . display = "none" ;
181+ document . getElementById ( "rdm6300" ) . style . display = "block" ;
182+ } else if ( rType === 6 ) {
183+ document . getElementById ( "wiegandForm" ) . style . display = "none" ;
184+ document . getElementById ( "mfrc522Form" ) . style . display = "block" ;
185+ document . getElementById ( "rc522gain" ) . style . display = "none" ;
186+ document . getElementById ( "rdm6300" ) . style . display = "block" ;
167187 }
168188}
169189
@@ -197,6 +217,7 @@ function listhardware() {
197217 document . getElementById ( "readertype" ) . value = config . hardware . readertype ;
198218 document . getElementById ( "wg0pin" ) . value = config . hardware . wgd0pin ;
199219 document . getElementById ( "wg1pin" ) . value = config . hardware . wgd1pin ;
220+ document . getElementById ( "rdm6300pin" ) . value = config . hardware . rdm6300pin ;
200221 document . getElementById ( "gpioss" ) . value = config . hardware . sspin ;
201222 document . getElementById ( "gain" ) . value = config . hardware . rfidgain ;
202223 document . getElementById ( "gpiorly" ) . value = config . hardware . rpin ;
@@ -249,6 +270,7 @@ function savehardware() {
249270 config . hardware . readertype = parseInt ( document . getElementById ( "readertype" ) . value ) ;
250271 config . hardware . wgd0pin = parseInt ( document . getElementById ( "wg0pin" ) . value ) ;
251272 config . hardware . wgd1pin = parseInt ( document . getElementById ( "wg1pin" ) . value ) ;
273+ config . hardware . rdm6300pin = parseInt ( document . getElementById ( "rdm6300pin" ) . value ) ;
252274 config . hardware . useridstoragemode = document . getElementById ( "useridstoragemode" ) . value ;
253275 config . hardware . requirepincodeafterrfid = document . getElementById ( "requirepincodeafterrfid" ) . checked ;
254276 config . hardware . allowpincodeonly = document . getElementById ( "allowpincodeonly" ) . checked ;
0 commit comments