📄 cursor.c
字号:
void WriteNum()
{
fElement fe, fe2;
char i, which;
int pos_start;
which=hor_1/2;
//FillRect(96, 260, 120, 60, 1, 1);
if (GetStatus(5, 0)==1) //时基
{
Get_TmfVal2(&fe, which);
for (i=2; i>=0; i--)
{
if (i==2) fe2.fdata=abs(Tmpos[1]-Tmpos[0]);
else
{
fe2.fdata=Tmpos[i]-10.0-T_range[which].Vallevel;//135.0;
}
fe2.fdata=fe2.fdata*fe.fdata/25.0;
fe2.funit=fe.funit;
std_real(&fe2);
FtoC(fe2.fdata, strFloat, 2, 4);
strcat(strFloat, zqstr[fe2.funit]);
pos_start=wstrlen(strFloat);
pos_start=256-i*64+(64-pos_start)/2;
DrawOut(MENU_Y+16, pos_start, strFloat, 3, 0);
}
}
else //电压
{
fe.funit=100;
if (GetStatus(5, 1)==2) //math
{
if (math_act)
{
if (ch1_range.Vallevel != ch2_range.Vallevel)
{
fe.fdata=1.0;
fe.funit=0x1c;
}
else
{
Get_VltfVal2(&fe, 0);
}
}
}
else //ch1 ch2
{
if (Y_range[GetStatus(5, 1)].active)
Get_VltfVal2(&fe, GetStatus(5, 1));
}
for (i=2; i>=0; i--)
{
if (fe.funit!=100)
{
if (i==2)
fe2.fdata=abs(Volpos[1]-Volpos[0]);
else
fe2.fdata=offset0[GetStatus(5, 1)]-Volpos[i];
fe2.fdata=fe2.fdata*fe.fdata/25.0;
fe2.funit=fe.funit;
std_real(&fe2);
FtoC(fe2.fdata, strFloat, 2,3);
strcat(strFloat, zqstr[fe2.funit]);
}
else strcpy(strFloat, "\x2e");
pos_start=wstrlen(strFloat);
pos_start=256-i*64+(64-pos_start)/2;
DrawOut(MENU_Y+16, pos_start, strFloat, 3, 0);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -