Better protection against bad data in c77. Slightly wider default Settings window.

This commit is contained in:
Joe Taylor 2018-08-30 10:52:38 -04:00
parent 5c628edb54
commit fed89ef888
2 changed files with 11 additions and 7 deletions

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>532</width> <width>534</width>
<height>546</height> <height>546</height>
</rect> </rect>
</property> </property>
@ -3076,10 +3076,10 @@ soundcard changes</string>
<buttongroups> <buttongroups>
<buttongroup name="CAT_stop_bits_button_group"/> <buttongroup name="CAT_stop_bits_button_group"/>
<buttongroup name="split_mode_button_group"/> <buttongroup name="split_mode_button_group"/>
<buttongroup name="CAT_handshake_button_group"/>
<buttongroup name="TX_mode_button_group"/>
<buttongroup name="CAT_data_bits_button_group"/> <buttongroup name="CAT_data_bits_button_group"/>
<buttongroup name="CAT_handshake_button_group"/>
<buttongroup name="TX_audio_source_button_group"/> <buttongroup name="TX_audio_source_button_group"/>
<buttongroup name="TX_mode_button_group"/>
<buttongroup name="PTT_method_button_group"/> <buttongroup name="PTT_method_button_group"/>
</buttongroups> </buttongroups>
</ui> </ui>

View File

@ -232,10 +232,14 @@ subroutine unpack77(c77,msg)
"NB ","NS ","QC ","ON ","MB ","SK ","AB ","BC ","NWT","NF ", & "NB ","NS ","QC ","ON ","MB ","SK ","AB ","BC ","NWT","NF ", &
"LB ","NU ","VT ","PEI","DC "/ "LB ","NU ","VT ","PEI","DC "/
if(index(c77,'*').ge.1) then !Check for bad data
! Check for bad data
do i=1,77
if(c77(i:i).ne.'0' .and. c77(i:i).ne.'1') then
msg='QUIRK 2' msg='QUIRK 2'
return return
endif endif
enddo
read(c77(72:77),'(2b3)') n3,i3 read(c77(72:77),'(2b3)') n3,i3
msg=repeat(' ',37) msg=repeat(' ',37)