forked from jelinj8/dso203
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu.c
2475 lines (2160 loc) · 101 KB
/
Menu.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/********************* (C) COPYRIGHT 2010 e-Design Co.,Ltd. ********************
File Name : Menu.c
Version : DS203_APP Ver 2.5x Author : bure
*******************************************************************************/
#include <string.h>
#include "Interrupt.h"
#include "Function.h"
#include "Process.h"
#include "Menu.h"
#include "Draw.h"
#include "BIOS.h"
#include "Calibrat.h"
#include "File.h"
u16 Result_FPS;
u8 Cnt_InCharge;
u8 Cnt_Charged;
u8 Cnt_Batt;
u8 FlagInCharge;
u16 NSamples;
u8 MinTresh=1; //adjust this as the least significant amount to be displayed in V meters
u8 BTwink=0;
u8 ConfigFileNumber=0;
s16 Ga_Max;
s16 Gb_Max;
s16 Ga_Min;
s16 Gb_Min;
s16 GHa_Max;
s16 GHb_Max;
s16 GHa_Min;
s16 GHb_Min;
s8 ShiftDigits;
u8 AutoFFT;
s8 GenFreqShift=0;
u8 GenAdjustMode=0;
u16 CurrentARR=0;
uc8 TIM2Speed[10]= {1,2,1,2,4,10,10,20,50,100};
u8 SweepMod=1;
u8 SweepStep=1;
u8 SweepIndex=2;
u8 Sweep=0;
s8 PrevShift=0;
u8 Det=0;
u8 GenTrigColorFlag;
u8 EnablePWM=1;
u8 PWAdjustMode=0;
u32 LastFreqReadout=0;
u8 EnableMeterCalc;
u8 T1Start=0;
u8 GenBaudAdjSpeed=0; //button 5 short press
u32 GenBaudRate=9600; // left toggle Adj=0
u8 GenUartMode=3; //word size/parity left toggle Adj=1
u8 GenUartCont=0; //1=continuous re-transmit left toggle Adj=2
u8 GenUartAdj=0; //adj item button 6 short press
u16 GenBaudIndex=7500; //control for baud rate, default= 9600 Baud (72E6/7500)
u8 GenUartStopBits=0; //0=1 stop bit, 1=2
u8 FastDimAdjust=0;
u8 FastDim=0;
u8 AutoSaveBuf=0;
u8 AutoSaveSelect=0;
u8 AutoTrigSelect=0;
u8 HboldAdjust=0;
u8 DETflag=0;
u8 ListOverride=0;
char EditChar[8][2]={{32,0},{32,0},{32,0},{32,0},{32,0},{32,0},{32,0},{32,0}};
u8 CharIndex=0;
char CharValue=0x20;
u8 AdjBeepLevel=0;
u8 MinBypass=0;
u8 AutoSetFlag=0;
u8 AutoSequence=0;
u8 OldCurDefTime=0;
u16 OldPosi=0;
u8 MeterStatus=0;
u8 OldMode;
u8 Neg=0;
u8 DownConvertMode=0;
const char GEN_UART_MODE_STR[6][4]={"7Pe","7Po","8N ","8Pe","8Po","9N "};
u32 TimeScaleCorrection(u32 Tmp, u8 Polarity, u16 Kp);
void CalculateTimeMeters(u32 Tmp, u32 m, u32 n, u16 Kp);
u32 Period(u8 Ch,u32 k);
u32 ClockAdjust(u32 Value);
u8 MeterChannelLogic(u8 i,u8 channel);
void UpdatePWMDuty(u8 service);
u8 ChDetLogic(u8 ch,u8 val);
u8 DetStatusLogic(u8 logic);
void SyncSweep(u8 track);
u8 ListLogic(void);
u16 KpCompensation(void);
void ProcessCursorDisplayStr(char* TmpStr);
void AutoSet(void);
uc16 X100TbaseScale[7]={33333,16667,6667,3333,1667,667,333};
const char T_UNIT[12] ={'n','S', 0 ,'u','S', 0 ,'m','S', 0 ,'S',' ', 0 };
const char D_UNIT[15] ={'u','S', 0 ,'u','S', 0 ,'m','S', 0 ,'S',' ', 0 ,'S',' ', 0 }; //special for delta T, will not work right with "n" as 1st ch
const char M_UNIT[15] ={'u','S', 0 ,'u','S', 0 ,'M',' ', 0 ,'M',' ', 0 ,'M',' ', 0 };
const char DD_UNIT[15] ={'n','S', 0 ,'u','S', 0 ,'m','S', 0 ,' ','S', 0 ,' ','S', 0 }; //for T cursor display and CSV time field
const char MM_UNIT[15] ={'u','S', 0 ,'u','S', 0 ,'m',' ', 0 ,'m', 0 , 0 ,'m', 0 , 0 };
const char H_UNIT[15] ={'u','S', 0 ,'u','S', 0 ,'m', 0 , 0 ,'h', 0 , 0 ,'h', 0 , 0 };
const char V_UNIT[12] ={'m','V', 0 ,'m','V', 0 ,'V',' ', 0 ,'V',' ', 0 }; //for delta V display
const char VV_UNIT[12] ={'m','V', 0 ,'m','V', 0 ,'V', 0 , 0 ,'V', 0 , 0 }; //for V cursor and trigger level displays
char N_UNIT[12] ={ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
const char S_UNIT[12] ={'/','S','e','c', 0 ,'/','S','e','c', 0 , 0 , 0 };
const char P_UNIT[12] ={'%',' ', 0 ,'%',' ', 0 ,'%',' ', 0 , 0 , 0 , 0 };
const char F_UNIT[12] ={'H','z', 0 ,'K','@', 0 ,'M','@', 0 ,'G','@', 0 }; //Used at high sweep rates so display works right
const char F_UNITSUB[12]={'m','@', 0 ,'H','z', 0 ,'K','@', 0 ,'M','@', 0 }; //added to keep original FREQ display working right at low sweep rates
const char STATESTR[3][10] = {"!RUN!", "HOLD", "HOLD"}; // Running state str
//uc16 S_Inv[3] = {(SCRN<<8)+TEXT2, (SCRN<<8)+X_POSI, (SCRN<<8)+NOTE1}; // Running state Color
uc16 S_Inv[3] = {(SCRN<<8)+TRACK4, (SCRN<<8)+X_POSI, (SCRN<<8)+NOTE1}; // Running state Color
const char BATT_STR[5][10] = {"~``'", "~``}", "~`;}", "~;;}", "{;;}"}; // Battery Status Str
/*
uc16 B_COLOR[5] = {(NOTE1<<8)+SCRN, (SIDE <<8)+SCRN,
(TEXT2<<8)+SCRN, (TEXT2<<8)+SCRN,
(TEXT2<<8)+SCRN}; */ // Battery Status Color
uc16 B_COLOR[5] = {(NOTE1<<8)+SCRN, (SIDE <<8)+SCRN,
(TRACK4<<8)+SCRN, (TRACK4<<8)+SCRN,
(TRACK4<<8)+SCRN}; // Battery Status Color
char CH_A_STR[5][10] = {" !OFF! ", "!CH(A)!", "!CH A !", "x10(A)", "x10 A "};
char CH_B_STR[5][10] = {" !OFF! ", "!CH(B)!", "!CH B !", "x10(B)", "x10 B "};
const char XY_CH_A_STR[5][10] = {" !OFF! ", "CH!A=!X", "CH!A=!X", "X10A=X", "X10A=X"};
const char XY_CH_B_STR[5][10] = {" !OFF! ", "CH!B=!Y", "CH!B=!Y", "X10B=Y", "X10B=Y"};
const char CH_C_STR[2][10] = {" !OFF! ", "!CH(C)!"};
const char CH_D_STR[16][10] = { " !OFF! ", "!CH(D)!", "!(A+B)!", "!(A-B)!",
"!(C&D)!", "!(C|D)!", "!REC_A!", "!REC_B!",
"!REC_C!","!REC_D!"," !MAP! "," SPEC ","hFFT_B","sFFT_B","hFFT_A","sFFT_A"}; // Track source Str
const char NO_RANGE[1] = ""; //" -- ";
const char NO_DEF[1] = ""; //"--";
const char YCOUPLE[7][10] = {"DC", "AC", "DT","TL","RS","i2","SP"}; // Track Couple Str
const char YCOUPLE_B[5][10] = {"DC", "AC", "DT","i2","SP"}; // Track Couple Str
char Vertical[15][10]; // Track Range Str
const char YPOSISTR[5] = {"YPOS"}; // Track Position Str
uc16 Y_INV[5] = {(SCRN<<8)+TR_1, (SCRN<<8)+TR_2,
(SCRN<<8)+TR_3, (SCRN<<8)+TR_4,
(SCRN<<8)+VERNIE}; // Track Color 1
uc16 Y_COLOR[5] = {(TR_1<<8)+SCRN, (TR_2<<8)+SCRN,
(TR_3<<8)+SCRN, (TR_4<<8)+SCRN,
(VERNIE<<8)+SCRN}; // Track Color 2
const char MODESTR[7][10] = {"TrOFF","!AUTO!", "NORML","NorCL","PERST","SINGL"," X_Y "}; // Sync Mode Str
char BaseStr[30][10]; // Time Base b Str
const char XPOSISTR[5] = {"XPOS"};
uc16 XCOLOR[2] = {(SCRN<<8)+X_POSI, (X_POSI<<8)+SCRN}; // Time Base Color
const char FO_TYPE[9][10] = {"!SINUS!", "TRIANG", "! SAW !", "SQUARE", "! PWM !","!NOISE!","! OFF !","!ARBTR!"," UART "}; // Output Kind Str "Kd= %"
const char FO_STR[23][10] = {"! 1Hz !", "! 2Hz !", "! 5Hz !",
" 10Hz ", " 20Hz ", " 50Hz ", "!100Hz!",
"!200Hz!", "!500Hz!", " 1KHz ", " 2KHz ",
" 5KHz ", "!10KHz!", "!20KHz!", "!50KHz!",
"100KHz", "200KHz", "500KHz", " 1MHz ",
" 2MHz ", " 4MHz ", " 6MHz ", " 8MHz "}; // Output Frequency Str
const char SubStr[13][10]= {"100mS","200mS","500mS","! 1S !","! 2S !","! 5S !"," 10S "," 15S "," 30S ","! 1M !","! 2M !","! 5M !"," 10M "};
//uc16 O_COLOR[2] = {(SCRN<<8)+TEXT3, (TEXT3<<8)+SCRN}; // Output Frequency Color BLUE
//uc16 O_COLOR[2] = {(SCRN<<8)+NOTE1, (NOTE1<<8)+SCRN}; // Output Frequency Color RED
u16 O_COLOR[2] = {(SCRN<<8)+NOTE1, (NOTE1<<8)+SCRN}; // Output Frequency Color RED
const char TRIGSTR[5][10] = {"TR A ", "TR B ", "TR C ", "TR D ", " A&B "}; // Trigger source Str
const char TR_TYPE[9][10] = {":!\\!", ":!^!", "<Vt", ">Vt", // Trigger Type Str
"L<[", "L>[", "H<[", "H>[", "GEN" }; // Seems clearer to state, for example: "low pulse less in width
// than delta T1-T2" as "L<Delta" rather than "<TL"
const char VT_STR[4] = "LEV";
const char DELAY_STR[2] = "T"; // Trigg holdoff indicator
const char FFT_GAIN_STR[10][6]={ {" LOG "},{" AUTO"},{" 0db "},{" +6db"},{"+12db"},
{"+18db"},{"+24db"},{"+30db"},{"+36db"},{"+42db"} };
uc8 TrunkFactor[8]={8,6,5,5,6,5,5,5};
const char VERNIE1[5] = {"!V1!"}; // V1 Vernie Str
const char VERNIE2[5] = {"!V2!"}; // V2 Vernie Str
const char VERNIE3[5] = {"!T1!"}; // T1 Vernie Str
const char VERNIE4[5] = {"!T2!"}; // T2 Vernie Str
uc16 V_INV[1] = {(SCRN<<8)+VERNIE};
uc16 V_COLOR[1] = {(VERNIE<<8)+SCRN}; // Y Vernie Color
uc16 T_INV[1] = {(SCRN<<8)+VERNIE};
uc16 T_COLOR[1] = {(VERNIE<<8)+SCRN}; // X Vernie Color
const char F_FUNC[2][11] = {"Save File", "Load File"}; // File Function Str
const char F_EXT[8][10] = {".BMP ", ".DAT ", ".BUF ",".CSV ", ".CFG ", ".ARB ", ".UAR ", " ROM "};
uc16 F_INV[1] = {(SCRN<<8)+TEXT1}; // File Color
const char DELTA_V[2][10] = {"[V:", "[V:"};
const char DELTA_T[2][4] = {"[T:", "Frq"};
const char METER[12][5] = {"Vbt", "FPS", "Vdc", "RMS", "Frq", "Max",
"Min", "Vpp", "Per", "Dut", "!TH!", "!TL!"};
s8 OS_Range=0;
u8 OS_RateSelect=0;
const char OSrate[6][20]={"OS rate 72MS/sec","OS rate 36MS/sec","OS rate 18MS/sec",
"OS rate 9MS/sec","OS rate 4.5MS/sec","OS rate 2.25MS/sec"};
u8 Detail[14];
char NumStr[12];
char VNumStr[12];
char TNumStr[12];
char CursorDisplayStr[12];
char CursorDisplayStrM[12];
char CursorDisplayStrH[12];
u8 Current = 0, Update = 1;
const char BL_Str[5]="B.L", Vol_Str[5]="Vol";
char x10[8][6] = {"0.5V", " 1V ", " 2V ", " 5V ", "!10V!", "!20V!", "!50V!", "100V"};
menu Title[13][4]=
{
// Item_String, m_Color, Limit, Mark, xPos, yPos, Value, Flag
{//============================ Title Track1 Group =========================== <0>
{(char*)CH_A_STR,(u16*)Y_INV, 5-1, CIRC, 35, 228, 1, UPDAT}, // Track source 2
{(char*)YCOUPLE, (u16*)Y_COLOR, 7-1, CIRC, 35, 216, 0, UPDAT}, // Track Couple
{(char*)Vertical,(u16*)Y_COLOR, 9-1, 0, 51, 216, 5, UPDAT}, // Track Range
{(char*)YPOSISTR,(u16*)Y_INV, 200, FIX, 0, 0, 150, UPDAT}, // Adj. Track Position 160
},
{//============================ Title Track2 Group =========================== <1>
{(char*)CH_B_STR,(u16*)Y_INV+1, 5-1, CIRC, 86, 228, 1, UPDAT}, // Track source 2
{(char*)YCOUPLE_B,(u16*)Y_COLOR+1,5-1, CIRC, 86, 216, 1, UPDAT}, // Track Couple
{(char*)Vertical,(u16*)Y_COLOR+1, 9-1, 0, 102, 216, 1, UPDAT}, // Track Range
{(char*)YPOSISTR,(u16*)Y_INV+1, 200, FIX, 0, 0, 100, UPDAT}, // Adj. Track Position
},
{//============================ Title Track3 Group =========================== <2>
{(char*)CH_C_STR,(u16*)Y_INV+2, 2-1, CIRC, 137, 228, 1, UPDAT}, // Track source
{(char*)NO_DEF , (u16*)Y_COLOR+2, 1-1, CIRC, 137, 216, 0, HID}, // Track Couple
{(char*)NO_RANGE,(u16*)Y_COLOR+2, 1-1, 0, 153, 216, 0, HID}, // Track Range
{(char*)YPOSISTR,(u16*)Y_INV+2, 200-1, FIX, 0, 0, 60, UPDAT}, // Adj. Track Position
},
{//============================ Title Track4 Group =========================== <3>
{(char*)CH_D_STR,(u16*)Y_INV+3, 16-1, CIRC, 188, 228, 1, UPDAT}, // Track source
{(char*)NO_DEF , (u16*)Y_COLOR+4, 1-1, FIX, 233, 0, 0, UPDAT}, // Used to store SpecMode and display FFT MAG
{(char*)NO_RANGE,(u16*)T_INV, 10-1, FIX, 217, 0, 0, UPDAT}, // FFT Gain Adjust
{(char*)YPOSISTR,(u16*)Y_INV+3, 200-1, FIX, 0, 0, 20, UPDAT}, // Adj. Track Position
},
{//================== Running State & Battery Status Group =================== <4>
{(char*)STATESTR,(u16*)S_Inv, 3-1, 0, 0, 228, 0, UPDAT}, // Running state
{(char*)BATT_STR,(u16*)B_COLOR, 5-1, 0, 0, 216, 0, UPDAT}, // Battery status
{(char*)BATT_STR,(u16*)B_COLOR, 5-1, NOT, 0, 0, 0, HID},
{(char*)BATT_STR,(u16*)B_COLOR, 5-1, NOT, 0, 0, 0, HID},
},
{//======================= Title Output Signal Group ========================= <5>
{(char*)FO_TYPE, (u16*)O_COLOR, 9-1, CIRC, 239, 228, 3, UPDAT}, // Output Wave Kind 282 228
{(char*)FO_STR, (u16*)O_COLOR+1,23-1, 0, 239, 216, 13, UPDAT}, // Output Frequency 282 216
{(char*)NumStr, (u16*)O_COLOR, 30000, NUM3, 212, 216, 15000, UPDAT}, // Duty value 100
{(char*)NumStr, (u16*)O_COLOR, 100, NUM3, 196, 216, 50, UPDAT}, // Attenuazione 251,202
},
{//========================= Title Time Base Group =========================== <6>
{(char*)MODESTR, (u16*)XCOLOR, 7-1, CIRC, 290, 228, 0, UPDAT}, // Sync Mode 5 numero modi 239 228
{(char*)BaseStr, (u16*)XCOLOR+1, 22-1, 0, 290, 216, 17, UPDAT}, // Time Base Range 239 216 WAS 27
{(char*)XPOSISTR,(u16*)XCOLOR, 3703, FIX, 366, 0, 0, UPDAT}, // Adj. X position 3795
{(char*)NO_RANGE,(u16*)T_INV, 253, FIX, 159, 0, 32, UPDAT}, // Adj. buffer size for X_Y mode View window rule 3795
},
{//=====================;===== Title Trigger Group ====;====================== <7>
{(char*)TRIGSTR, (u16*)Y_INV, 5-1, CIRC, 333, 228, 1, UPDAT}, // Trigger source
{(char*)TR_TYPE, (u16*)Y_INV, 9-1, CIRC, 373, 228, 0, UPDAT}, // Trigger Kine was 8-1
{(char*)VT_STR, (u16*)Y_COLOR, 200, FIX, 333, 216, 0, UPDAT}, // Adj. Trigger threshold
{(char*)DELAY_STR,(u16*)Y_COLOR, 3400, FIX, 92, 0, 0, UPDAT}, // Trigger holdoff value
},
{//============================ Title Y Vernie Group ========================= <8>
{(char*)VERNIE1, (u16*)V_INV, 201-1, FIX, 35, 0, 180, UPDAT}, // V1 Vernie
{(char*)VERNIE2, (u16*)V_INV, 201-1, FIX, 62, 0, 40, UPDAT}, // V2 Vernie
{(char*)DELTA_V, (u16*)Y_INV, 2-1, CIRC, 314, 197, 0, UPDAT}, // Measure Track
{(char*)NumStr, (u16*)Y_COLOR, 240, NUM3, 342, 197, 70, UPDAT}, // Delta V value
},
{//============================= Title File Group ============================ <9>
{(char*)F_FUNC, (u16*)F_INV, 2-1, CIRC, 126, 0, 0, 0}, // File function
{(char*)NumStr, (u16*)F_INV, 256-1, NUM3, 206, 0, 0, 1}, // File number
{(char*)F_EXT, (u16*)F_INV, 8-1, CIRC, 230, 0, 0, 0}, // Ext. name
{(char*)NO_RANGE,(u16*)F_INV, 15-1, FIX, 166, 0, 0, HID}, // Dir readout position
},
{//============================ Title X Vernie Group ========================= <10>
{(char*)VERNIE3, (u16*)T_INV, 395, FIX, 312, 0, 80, UPDAT}, // T1 Vernie 300
{(char*)VERNIE4, (u16*)T_INV, 395, FIX, 339, 0, 280, UPDAT}, // T2 Vernie 300
{(char*)DELTA_T, (u16*)T_INV, 2-1, CIRC, 314, 182, 0, UPDAT}, // Delta T Str
{(char*)NumStr, (u16*)T_COLOR, 400, NUM3, 342, 182, 80, UPDAT}, // Delta T value 300
},
{//=========================== Title BackLight Group ========================= <11>
{(char*)BL_Str, (u16*)V_INV, 1-1, FIX, 314, 167, 0, HID}, // BackLight
{(char*)NumStr, (u16*)V_COLOR, 10-1, NUM2, 342, 167, 5, HID}, // Class
{(char*)NumStr, (u16*)V_INV, 0, NOT, 0, 0, 0, HID},
{(char*)NumStr, (u16*)V_INV, 0, NOT, 0, 0, 0, HID},
},
{//============================ Title Volume Group =========================== <12>
{(char*)Vol_Str, (u16*)V_INV, 1-1, FIX, 314, 152, 0, HID}, // Volume
{(char*)NumStr, (u16*)V_COLOR, 10-1, NUM2, 342, 152, 5, HID}, // Class was 11-1, causing display error
{(char*)NumStr, (u16*)V_INV, 0, NOT, 0, 0, 0, HID},
{(char*)NumStr, (u16*)V_INV, 0, NOT, 0, 0, 0, HID},
},
};
//.str
meter Meter[9]= //.track .item .flag
{ {(char*)METER, 4, VBT, 314, 342, 137, UPDAT}, // Meter #0
{(char*)METER, 4, FPS, 314, 342, 122, UPDAT}, // Meter #1
{(char*)METER, TRACK4, FRQ, 314, 342, 107, UPDAT}, // Meter #2
{(char*)METER, TRACK3, CIR, 314, 342, 92, UPDAT}, // Meter #3
{(char*)METER, TRACK3, DUT, 314, 342, 77, UPDAT}, // Meter #4
{(char*)METER, TRACK2, TH, 314, 342, 62, UPDAT}, // Meter #5
{(char*)METER, TRACK2, TL, 314, 342, 47, UPDAT}, // Meter #6
{(char*)METER, TRACK1, VPP, 314, 342, 32, UPDAT}, // Meter #7
{(char*)METER, TRACK1, VDC, 314, 342, 17, UPDAT}, // Meter #8
};
void Display_Meter(void) // refresh measurements display
{
u16 color;
u8 i;
u8 MeterLimit=9;
if(FlagMeter==2){
MeterLimit=1;
if(UpdateMeter!=4)MeterLimit=0;
}
for(i=0; i<MeterLimit;i++){
if(Meter[i].Flag & UPDAT){ //-----the name of the measurements show the need to refresh
Meter[i].Flag &= (!UPDAT & !BLINK); // Clr Update & Blink flag
if(((Options&4)==4)&&((Meter[i].Item==MIN)||(Meter[i].Item==MAX)))
color=Y_INV[4];else color=Y_INV[Meter[i].Track];
Print_Str
(Meter[i].XPOS1, Meter[i].YPOS, // coordinates to be displayed
color, // need to display color (belongs channel)
PRN, // print (no flash)
Meter[i].Str +(Meter[i].Item * 5)); // need to display the project name
}
}
if((Current >= METER_0)&&(Current <(MeterLimit+METER_0))){
if(Blink){ //----- the name of the display required flashing measurements
i = Current - METER_0;
Blink = 0; // Clr Blink Ctrl flag
if(((Options&4)==4)&&((Meter[i].Item==MIN)||(Meter[i].Item==MAX)))
color=Y_INV[4];else color=Y_INV[Meter[i].Track];
Print_Str(
Meter[i].XPOS1, Meter[i].YPOS, // flashing coordinates
color, // flashing colors (belongs channel)
Twink, // flashing
Meter[i].Str +(Meter[i].Item *5)); // flashing the project name
}
}
}
void Display_Value(u8 i)
{
s32 Tmp = 0;
s32 Tmp2= 0;
u32 UTmp=0;
u16 Kp;
u32 k, n, m;
u8 j;
Kp=KpCompensation();
k = _T_Range; m = 1; n = 1;
if(k < 9) m = Power(10, (11-k)/3); //9 //11
else n = Power(10, (k- 9)/3); //9
k = X_Attr[(k%3)+9].SCALE;
ShiftDigits=0;
if(DETflag)goto CalculateDETvalues;
if(FFTflag)goto CalculateFFTvalues;
if((DownConvertInitiate)||(DownConvertMode))goto CalculateDownConvertValues;
switch (Meter[i].Item){
case VBT://--------------- calculation and display of battery voltage ---------------
Int2Str(NumStr, __Get(V_BATTERY)*1000, V_UNIT, 3, SIGN,0);
break;
case FPS://--------------- calculates and displays the frame count ---------------
Int2Str(NumStr, Result_FPS, S_UNIT, 3, STD,0);
for(j=0;j<11;j++)NumStr[j]=NumStr[j+1];
break;
case VPP:
if(Meter[i].Track == TRACK1){
if(MeterChannelLogic(i,TRACK1)){
Tmp=Ga_Max+Ka1[_A_Range]-_1_posi;
Tmp=Ka2[_A_Range]*Tmp;
if (Tmp>0)Tmp+=512; else Tmp-=512; // Flip bias down when calculating negative values
Tmp2=Ga_Min+Ka1[_A_Range]-_1_posi; // otherwise neg values end up 1 LSB short after adding +1/2 LSB (+512/1024)
Tmp2=Ka2[_A_Range]*Tmp2;
if (Tmp2>0)Tmp2+=512; else Tmp2-=512;
Tmp=(Tmp/1024)-(Tmp2/1024);
if(Tmp <= MinTresh) Tmp = 0;
Tmp *= Y_Attr[_A_Range].SCALE;
if(_1_source>2)Tmp=Tmp*10;
}else Tmp=0;
}
if(Meter[i].Track == TRACK2){
if(MeterChannelLogic(i,TRACK2)){
Tmp=Gb_Max+Kb1[_B_Range]-_2_posi;
Tmp=Kb2[_B_Range]*Tmp;
if (Tmp>0)Tmp+=512; else Tmp-=512;
Tmp2=Gb_Min+Kb1[_B_Range]-_2_posi;
Tmp2=Kb2[_B_Range]*Tmp2;
if (Tmp2>0)Tmp2+=512; else Tmp2-=512;
Tmp=(Tmp/1024)-(Tmp2/1024);
if(Tmp <= MinTresh) Tmp = 0;
Tmp *= Y_Attr[_B_Range].SCALE;
if(_2_source>2)Tmp=Tmp*10;
}else Tmp=0;
}
Int2Str(NumStr, Tmp, V_UNIT, 3, SIGN,0);
break;
case VDC:
if(Meter[i].Track == TRACK1){
if(MeterChannelLogic(i,TRACK1)){
Tmp=((VxAvg[0]/NSamples)+Ka1[_A_Range]-_1_posi);
Tmp=Ka2[_A_Range]*Tmp; // Add signal level correction factor based on signal zero level rather than bottom of screen, prevents offsets from corrupting value
if (Tmp>0)Tmp+=512; else Tmp-=512;
Tmp/=1024;
if((Tmp >= -MinTresh)&&(Tmp <= MinTresh)) Tmp = 0;
Tmp *= Y_Attr[_A_Range].SCALE;
if(_1_source>2)Tmp=Tmp*10;
}else Tmp=0;
}
if(Meter[i].Track == TRACK2){
if(MeterChannelLogic(i,TRACK2)){
Tmp=((VxAvg[1]/NSamples)+Kb1[_B_Range]-_2_posi);
Tmp=Kb2[_B_Range]*Tmp;
if (Tmp>0)Tmp+=512; else Tmp-=512;
Tmp/=1024;
if((Tmp >= -MinTresh)&&(Tmp <= MinTresh)) Tmp = 0;
Tmp *= Y_Attr[_B_Range].SCALE;
if(_2_source>2)Tmp=Tmp*10;
}else Tmp=0;
}
Int2Str(NumStr, Tmp, V_UNIT, 3, SIGN,0);
break;
case RMS:
if(Meter[i].Track == TRACK1){
if(MeterChannelLogic(i,TRACK1)){
Tmp = (Ka2[_A_Range]*Int_sqrt(VxSsq[0]/NSamples)+ 512)/1024; // adding Ka1 here causes error in calc, already factored in in Process...
if(Tmp <= MinTresh) Tmp = 0;
Tmp *= Y_Attr[_A_Range].SCALE;
if(_1_source>2)Tmp=Tmp*10;
}else Tmp=0;
}
if(Meter[i].Track == TRACK2){
if(MeterChannelLogic(i,TRACK2)){
Tmp = (Kb2[_B_Range]*Int_sqrt(VxSsq[1]/NSamples)+ 512)/1024;
if(Tmp <= MinTresh) Tmp = 0;
Tmp *= Y_Attr[_B_Range].SCALE;
if(_2_source>2)Tmp=Tmp*10;
}else Tmp=0;
}
Int2Str(NumStr, Tmp, V_UNIT, 3, SIGN,0); //unsign
break;
case MAX:
if(Meter[i].Track == TRACK1){
if(MeterChannelLogic(i,TRACK1)){
Tmp=GHa_Max+Ka1[_A_Range]-_1_posi;
Tmp=Ka2[_A_Range]*Tmp;
if (Tmp>0)Tmp+=512; else Tmp-=512;
Tmp/=1024;
if((Tmp >= -MinTresh)&&(Tmp <= MinTresh)) Tmp = 0;
Tmp *= Y_Attr[_A_Range].SCALE;
if(_1_source>2)Tmp=Tmp*10;
}else Tmp=0;
}
if(Meter[i].Track == TRACK2){
if(MeterChannelLogic(i,TRACK2)){
Tmp=GHb_Max+Kb1[_B_Range]-_2_posi;
Tmp=Kb2[_B_Range]*Tmp;
if (Tmp>0)Tmp+=512; else Tmp-=512;
Tmp/=1024;
if((Tmp >= -MinTresh)&&(Tmp <= MinTresh)) Tmp = 0;
Tmp *= Y_Attr[_B_Range].SCALE;
if(_2_source>2)Tmp=Tmp*10;
}else Tmp=0;
}
Int2Str(NumStr, Tmp, V_UNIT, 3, SIGN,0);
break;
case MIN:
if(Meter[i].Track == TRACK1){
if(MeterChannelLogic(i,TRACK1)){
Tmp=GHa_Min+Ka1[_A_Range]-_1_posi;
Tmp=Ka2[_A_Range]*Tmp;
if (Tmp>0)Tmp+=512; else Tmp-=512;
Tmp/=1024;
if((Tmp >= -MinTresh)&&(Tmp <= MinTresh)) Tmp = 0;
Tmp *= Y_Attr[_A_Range].SCALE;
if(_1_source>2)Tmp=Tmp*10;
}else Tmp=0;
}
if(Meter[i].Track == TRACK2){
if(MeterChannelLogic(i,TRACK2)){
Tmp=GHb_Min+Kb1[_B_Range]-_2_posi;
Tmp=Kb2[_B_Range]*Tmp;
if (Tmp>0)Tmp+=512; else Tmp-=512;
Tmp/=1024;
if((Tmp >= -MinTresh)&&(Tmp <= MinTresh)) Tmp = 0;
Tmp *= Y_Attr[_B_Range].SCALE;
if(_2_source>2)Tmp=Tmp*10;
}else Tmp=0;
}
Int2Str(NumStr, Tmp, V_UNIT, 3, SIGN,0);
break;
case FRQ:
for(j=0;j<4;j++)if(MeterChannelLogic(i,j))UTmp=Sum[j];
CalculateDownConvertValues:
if(DownConvertMode){
if(_4_source>13)UTmp=Sum[0];
else if((_4_source==12)||(_4_source==13))UTmp=Sum[1];
}
CalculateDETvalues:
if(DETflag){
if(Title[TRIGG][SOURCE].Value==0)UTmp=Sum[0];
else if(Title[TRIGG][SOURCE].Value==1)UTmp=Sum[1];
else {LastFreqReadout=0;return;}
}
UTmp=UpScale(UTmp,1);
CalculateFFTvalues:
if(FFTflag)UTmp=500000000;
UTmp=ClockAdjust(UTmp);
if((DownConvertMode)&&(FFTflag==0)&&(DownConvertInitiate==0)){
LfreqPeriod=UTmp;
FFTdownConvert(3);
return;
}
if(n < 10){
UTmp=(1000*((UTmp+(k/2))/k))/m;
if((DownConvertInitiate==1)&&(FFTflag==0)){
FreqIN=UTmp/1000;
FreqScaleShift=ShiftDigits;
return;
}
if(DETflag){
UTmp=(UTmp/100)*99; //for detector mode, -1% compensation for shifting freq in sweep mode
LastFreqReadout=UTmp/1000;
}
if(FFTflag){
if(ChartLogic()){
UTmp=(((((72000000/(TbaseSub[SubIndex-1].Arr+1))*10000) /(TbaseSub[SubIndex-1].S_OS_Size))*100)
/(TbaseSub[SubIndex-1].Psc+1))/2;
ShiftDigits=3;
}
NFreq=UTmp;for(j=0;j<12;j++)N_UNIT[j]=F_UNITSUB[j];
} else {
if(ChartLogic()){UTmp=0;ShiftDigits=0;} //don't calculate time meters when using chart
Int2Str(NumStr,UTmp, F_UNITSUB , 4, UNSIGN, ShiftDigits);
}
}
else{
if(FFTflag){NFreq=UTmp;for(j=0;j<12;j++)N_UNIT[j]=F_UNIT[j];}
if(Kp==1024){
UTmp=n*((UTmp+(k/2))/k);
if(DownConvertInitiate==1){
FreqIN=UTmp;
FreqScaleShift=ShiftDigits;
return;
}
if(DETflag){
UTmp=(UTmp/100)*99; //for detector mode, -1% compensation for shifting freq in sweep mode
LastFreqReadout=UTmp;
}
if(FFTflag)NFreq=UTmp;else Int2Str(NumStr,UTmp, F_UNIT, 4, UNSIGN, ShiftDigits);
}
else{ //for interpolated ranges, adjust to prevent truncation errors in scaling to be further multiplied
UTmp=TimeScaleCorrection(UTmp,0,Kp);
if(Kp==24576){
UTmp=((Kp*((((n/10)*((UTmp+(k/2))/k))+512)/1024))+5)/10; //Kp here X100 * n/10= /10
}else{
UTmp=((Kp*(((n*((UTmp+(k/2))/k))+512)/1024))+5)/10; //Kp X10 so need to /10
}
if(DownConvertInitiate==1){
FreqIN=UTmp;
FreqScaleShift=ShiftDigits;
return;
}
if(UTmp>0x7FFFFFFF){ //scale down if beyond s32 range
Tmp=(UTmp/10);
ShiftDigits--;
}else Tmp=UTmp;
if(FFTflag)NFreq=Tmp;else Int2Str(NumStr,Tmp, F_UNIT, 4, UNSIGN, ShiftDigits);
}
}
if(DETflag){
j=ShiftDigits;
while(j>0){LastFreqReadout/=10;j--;} //cancel up-scaling for detector mode frequency readouts
}
if(DETflag)return;
if(FFTflag)return;
break;
case CIR:
for(j=0;j<4;j++)if(MeterChannelLogic(i,j))UTmp=Period(j,k);
CalculateTimeMeters(UTmp,m,n,Kp);
break;
case DUT:
if(EnablePaS){ //only update these once per second
for(j=0;j<4;j++)if(MeterChannelLogic(i,j))Tmp=((10000*PxS[j])/TxS[j])*10;
if(ChartLogic()){Tmp=0;ShiftDigits=0;}
Int2Str(NumStr, Tmp, P_UNIT, 4, UNSIGN,0);
}
break;
case TL:
if(EnablePaS){
for(j=0;j<4;j++)if(MeterChannelLogic(i,j))UTmp=(UpScale(k*(TxS[j]-PxS[j]),1)+(TxN[j]/2))/TxN[j];
CalculateTimeMeters(UTmp,m,n,Kp);
}
break;
case TH:
if(EnablePaS){
for(j=0;j<4;j++)if(MeterChannelLogic(i,j))UTmp=(UpScale(k*PxS[j],1)+(TxN[j]/2))/TxN[j];
CalculateTimeMeters(UTmp,m,n,Kp);
}
break;
} //end switch
if (FlagMeter==1){
Print_Str(
Meter[i].XPOS2, Meter[i].YPOS,
Y_COLOR[Meter[i].Track],
PRN,
NumStr); // display the measured values
}else if (FlagMeter==2){ // display measured values and meter title in big meters
DisplayBigMeter(i);
}
}
void Display_Title(void)
{
u16 i, j, TmpColor; //,BaseRatio;
u8 l;
u8 z;
char *p;
char Zero[2];
Zero[1]=0;
CH_A_STR[2][5]=129; CH_A_STR[4][5]=129;
CH_B_STR[2][5]=129; CH_B_STR[4][5]=129;
if(((Sweep)||(_Kind==5))&&(_Kind<6)){
O_COLOR[0]=(SCRN<<8)+VERNIE;
O_COLOR[1]=(VERNIE<<8)+SCRN;
}else{
O_COLOR[0]=(SCRN<<8)+NOTE1;
O_COLOR[1]=(NOTE1<<8)+SCRN;
}
//if(TimedDeltaView>0)ShiftLeft=2; else ShiftLeft=0; //move it away from right edge to clear border
if (_Mode==X_Y){ //replace menu title for chA and chB to show X_Y mode
Title[0][0].Str=(char*)XY_CH_A_STR;
Title[1][0].Str=(char*)XY_CH_B_STR;
}else{ //show regular title
Title[0][0].Str=(char*)CH_A_STR;
Title[1][0].Str=(char*)CH_B_STR;
}
if ((Current == OUTPUT)&&((_Det==DUTYPWM) || (_Det==OUTATT))){ z=Twink; }else { z=INV;}
if (Title[OUTPUT][KIND].Value == PWM)
{
u8ToDec3(Title[OUTPUT][DUTYPWM].Str,(Title[OUTPUT][DUTYPWM].Value+150)/300,0);
Print_Str(172, 216,(Title[OUTPUT][DUTYPWM].Color[0]), z, "Dut% "); //225,202[Title[OUTPUT][PWM].Value]
Print_Str(212, 216,O_COLOR[0],z,Title[OUTPUT][DUTYPWM].Str);
}
else
{
Print_Str(172, 216, (Title[OUTPUT][DUTYPWM].Color[0]), z, "Vo ");//230,202
Int2Str(NumStr, (Title[OUTPUT][OUTATT].Value*28000), V_UNIT, 2, UNSIGN,0); //26000
Print_Str(196,216,O_COLOR[0],z,NumStr);
}
if (CalFlag==0){
Print_Str(137,216,0x0405,PRN,"U");
}else{
Print_Str(137,216,0x0405,PRN,"C");
}
if (CurDefTime==0){
Print_Str(153,216,0x0405,PRN," ");
}else{
Print_Str(153,216,0x0405,PRN,"X");
}
if(Options&4){
Print_Str(145,216,0x0405,PRN,"H");
}else{
Print_Str(145,216,0x0405,PRN," ");
}
p=(char*)Zero;
if(ListOverride){
*p=0x23; //box
}else{
*p='0'+ConfigFileNumber;
}
Print_Str(161,216,0x0405,PRN,Zero);
if(NotificationTimer==0){
FFTlevel(0);
DisplaySamples();
}
for(i = TRACK1; i <= VOLUME; ++i){
for(j = 0; j < 4; ++j){
if(Title[i][j].Flag & UPDAT){ // need to refresh the Item
Title[i][j].Flag &= ~UPDAT; // Clr Update flag
if((i == BATTERY)||(i == TRIGG)){
if(Title[i][j].MARK & FIX){ // ---- Under fix mode
if (!((i==TRIGG)&&(j==3)&&((NotificationTimer>0)||(Current==FILE)))){ // "T" delay
Print_Str( //notifications are displayed
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[Title[i][0].Value], // Color variable
PRN,
Title[i][j].Str // String fixed
);
}
}else if((i == TRIGG)&&(j==1)){ //trig kind, to enable gen kind color shift
if (GenTrigColorFlag)TmpColor=0x0509;
else TmpColor=Title[i][j].Color[Title[i][0].Value];
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
TmpColor, // Color variable
PRN,
Title[i][j].Str +(Title[i][j].Value * 10)// String variable
);
}else if(!(Title[i][j].MARK & NOT)){ // ---- Under other mode
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[Title[i][0].Value], // Color variable
PRN,
Title[i][j].Str +(Title[i][j].Value * 10)// String variable
);
}
} else { //not battery or trigg
if(Title[i][j].MARK & FIX){ // ---- Under fix mode
if (!((i==9)&&(j==3))){ //DIR LIST OR EDIT BOX, SHOW REGULAR MENU HERE (default files) WHEN NOT SELECTED
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[0], // Color fixed
PRN,
Title[i][j].Str // String fixed
// battery and volume meter titles - not flashing
);
}
} else if(Title[i][j].MARK & NUM3){ // ---- Under NUM3 mode
if(i == V_VERNIE){
CalculateVvernier(0);
Print_Str(
(Title[i][j].XPOS), Title[i][j].YPOS,
Title[i][j].Color[_Meas_V_Track], // Color fixed
PRN,
VNumStr // String for numerical
);
}
if(i == T_VERNIE){
CalculateTvernier(0); //delta T service
Print_Str(
(Title[i][j].XPOS), Title[i][j].YPOS, //shift left when calling with no meters to clear right edge
Title[i][j].Color[0], // Color fixed
PRN,
TNumStr // String for numerical
);
}
if(i==FILE){
u8ToDec3(Title[FILE][1].Str, Title[FILE][1].Value,0);
Print_Str(
Title[FILE][1].XPOS, Title[FILE][1].YPOS,
Title[FILE][1].Color[0], // Color fixed
PRN,
Title[FILE][1].Str // String for numerical
);
}
} else if(Title[i][j].MARK == NUM2){
NumStr[0]=' ';
if(i == BK_LIGHT){ // backlight percentage
if(Title[i][j].Value == 9){
Int2Str(NumStr, 100, P_UNIT, 3, STD,0);
} else Int2Str(NumStr, 10*(Title[i][j].Value+1), P_UNIT, 2, STD,0);
} else { // volume percentage
if(Title[i][j].Value == 9){ //was 10, changed so volume ind works properly
Int2Str(NumStr, 100, P_UNIT, 3, STD,0);
} else Int2Str(NumStr, 10*(Title[i][j].Value+1), P_UNIT, 2, STD,0);
}
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[0], // Color fixed
PRN,
NumStr // String for numerical
//Battery and volume values
);
} else if(Title[i][j].MARK != NOT){
if(i == V_VERNIE){
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[_Meas_V_Track], // Color variable
PRN,
Title[i][j].Str +(Title[i][j].Value * 10) // String variable
//Delta V meter title
);
} else if(i == T_VERNIE){
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[0], // Color fixed
PRN,
Title[i][j].Str + (Title[i][j].Value * 4) // String variable
);
}else{
if (i<=1 && j==2 && Title[i][0].Value>2){
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[0], // Color fixed
PRN,
x10[Title[i][j].Value]// String variable
//ChA or ChB x10 value - not flasing
);
}else if((i==6)&&(j==1)&&(ChartLogic())){ //for chart speed timebases
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
0x0405, // Color fixed
PRN,
(char*)SubStr[SubIndex-1]); // String variable
}else if((i==9)&&(j==0)){ //for file function display
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[0], // Color fixed
PRN,
Title[i][j].Str +(Title[i][j].Value * 11) // String variable
); // String variable
} else {
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[0], // Color fixed
PRN,
Title[i][j].Str +(Title[i][j].Value *10) // String variable
);
}
}
} //end of else if(Title[i][j].MARK != NOT)
}//end of else(if not battery or trigg) end of all other titles
} else if((Current == i)&&(Detail[i] == j)&&(Blink)){ // current cursor position Item
Blink = 0;
if((i == BATTERY)||(i == TRIGG)){
if((Title[i][j].MARK & FIX)){ // ---- Under fix mode
if (j==3) { //show delayed trigger "T" on view area<<SHOULD ADD I=TRIGG?
if ((FrameMode==2)&&((Options&1)>0)&&(NotificationTimer==0)) {
Print_Str(Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[Title[i][0].Value], // Color variable
Twink,
Title[i][j].Str); // String fixed
}
}else{
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[Title[i][0].Value], // Color variable
Twink,
Title[i][j].Str // String fixed
);
}
}else if((i == TRIGG)&&(j==1)){ //trig kind, to enable gen kind color shift
if (GenTrigColorFlag)TmpColor=0x0509;
else TmpColor=Title[i][j].Color[Title[i][0].Value];
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
TmpColor, // Color variable
Twink,
Title[i][j].Str +(Title[i][j].Value * 10)// String variable
);
} else { // ---- Under other mode
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[Title[i][0].Value], // Color variable
Twink,
Title[i][j].Str +(Title[i][j].Value * 10)// String variable
);
}
} else { //other than battery or trigg
if(Title[i][j].MARK & FIX){ // ---- Under fix mode
if((Current==9)&&(_Det==3)&&(i==9)&&(j==3)&&(Title[FILE][0].Value==0)){ //EDIT BOX
for(l=0;l<8;l++){
if(l==CharIndex){
Print_Str(
Title[i][j].XPOS+(l*8), Title[i][j].YPOS,
Title[i][j].Color[0], // Color fixed
Twink,
EditChar[l] // String fixed < HILIGHTED
);
}else{
Print_Str(
Title[i][j].XPOS+(l*8), Title[i][j].YPOS,
Title[i][j].Color[0], // Color fixed
PRN,
EditChar[l] // String fixed < INDEXED
);
}
}
}else if(!((Current==9)&&(_Det==3)&&(i==9)&&(j==3)&&(Title[FILE][0].Value==1))){
Print_Str(
Title[i][j].XPOS, Title[i][j].YPOS,
Title[i][j].Color[0], // Color fixed
Twink,
Title[i][j].Str // String fixed