17
MsgBox "The AFeL is ready to begin broadcasting", vbOKOnly,
"Success"
frmMain.cmdBroadcast.Enabled = True
End Sub
Private Sub cmdBroadcast_Click()
If cmdBroadcast.Caption = "Start Broadcasting" Then
intMode = TXON
sngBCFreq = sngTestFreq
'Sends three bytes to the device and reads two bytes back.
Buffer(0) = intMode
Buffer(1) = Int(sngTestFreq * 10) / 256
Buffer(2) = Int(sngTestFreq * 10) Mod 256
HIDComm1.WriteTo Buffer, 3
Buffer = HIDComm1.ReadFrom(2)
intModeRtn = Buffer(0)
intCommResult = Buffer(1)
If intModeRtn = intMode Then
If intCommResult = GOOD Then
cmdBroadcast.Caption = "Cancel Broadcasting"
cmdChkFreq.Enabled = False
cmdAutoScan.Enabled = False
Else
If intCommResult = BAD Then
MsgBox "error", vbOKOnly
Else
MsgBox "error", vbOKOnly
End If
End If
Else
MsgBox "error", vbOKOnly
End If
Else
intMode = TXOFF
'Sends three bytes to the device and reads two bytes back.
Buffer(0) = intMode
Buffer(1) = Int(sngTestFreq * 10) / 256
Buffer(2) = Int(sngTestFreq * 10) Mod 256
HIDComm1.WriteTo Buffer, 2
Buffer = HIDComm1.ReadFrom(2)
intModeRtn = Buffer(0)
intCommResult = Buffer(1)
If intModeRtn = intMode Then
If intCommResult = GOOD Then
cmdBroadcast.Caption = "Start Broadcasting"
cmdChkFreq.Enabled = True
cmdAutoScan.Enabled = True
Comentarios a estos manuales