LED Laser 4
Varytec
BeatDelivery
unit NewDeviceUnit;
interface
procedure InitDevice(Device: String);
procedure FormShow;
procedure FormRefresh(channel:Integer);
procedure FormClose;
procedure ColorPickerChange(R, G, B: Byte);
procedure SwitchColorPicker;
procedure speedchange;
procedure onbtnclick;
procedure offbtnclick;
procedure programchange;
procedure special1change;
procedure ColorPickerChange(R, G, B: Byte);
procedure SwitchColorPicker;
procedure special2change;
procedure speedchange;
implementation
var
DontRefresh:boolean;
procedure InitDevice(Device: String);
begin
end;
procedure FormShow;
begin
end;
procedure FormRefresh(channel:Integer);
var
Value:integer;
r,phi,temp:Double;
begin
if not DontRefresh then
case channel of
0:
begin
special1slider0.position:=get_channel('special1');
end;
1:
begin
// RGB-Änderungen werden derzeit nicht im DDF angezeigt
end;
2:
begin
// RGB-Änderungen werden derzeit nicht im DDF angezeigt
end;
3:
begin
// RGB-Änderungen werden derzeit nicht im DDF angezeigt
end;
4:
begin
special2slider4.position:=get_channel('special2');
end;
5:
begin
speedslider5.position:=get_channel('speed');
end;
end;
DontRefresh:=false;
end;
procedure FormClose;
begin
end;
procedure ColorPickerChange(R, G, B: Byte);
begin
set_channel('r',-1,r,0);
set_channel('g',-1,g,0);
set_channel('b',-1,b,0);
end;
procedure SwitchColorPicker;
begin
if colorpicker.visible then
begin
colorpicker.visible:=false;
colorpicker2.visible:=true;
end else
begin
colorpicker.visible:=true;
colorpicker2.visible:=false;
end;
end;
procedure speedchange;
begin
DontRefresh:=true;
set_channel('SPEED',-1,SPEEDslider.position,0);
end;
procedure onbtnclick;
begin
DontRefresh:=true;
set_channel('SPECIAL1',-1,255,0);
Label4.caption:='Eingeschaltet';
end;
procedure offbtnclick;
begin
DontRefresh:=true;
set_channel('SPECIAL1',-1,0,0);
Label4.caption:='Ausgeschaltet';
end;
procedure programchange;
begin
DontRefresh:=true;
case Combobox1.itemindex of
0: set_channel('SPECIAL2',-1,0,0);
1: set_channel('SPECIAL2',-1,1,0);
2: set_channel('SPECIAL2',-1,8,0);
3: set_channel('SPECIAL2',-1,29,0);
4: set_channel('SPECIAL2',-1,37,0);
5: set_channel('SPECIAL2',-1,47,0);
6: set_channel('SPECIAL2',-1,50,0);
7: set_channel('SPECIAL2',-1,58,0);
8: set_channel('SPECIAL2',-1,69,0);
9: set_channel('SPECIAL2',-1,73,0);
10: set_channel('SPECIAL2',-1,78,0);
11: set_channel('SPECIAL2',-1,84,0);
12: set_channel('SPECIAL2',-1,95,0);
13: set_channel('SPECIAL2',-1,100,0);
14: set_channel('SPECIAL2',-1,110,0);
15: set_channel('SPECIAL2',-1,115,0);
16: set_channel('SPECIAL2',-1,120,0);
17: set_channel('SPECIAL2',-1,130,0);
18: set_channel('SPECIAL2',-1,135,0);
19: set_channel('SPECIAL2',-1,140,0);
20: set_channel('SPECIAL2',-1,150,0);
21: set_channel('SPECIAL2',-1,160,0);
22: set_channel('SPECIAL2',-1,170,0);
23: set_channel('SPECIAL2',-1,178,0);
24: set_channel('SPECIAL2',-1,185,0);
25: set_channel('SPECIAL2',-1,190,0);
26: set_channel('SPECIAL2',-1,200,0);
27: set_channel('SPECIAL2',-1,205,0);
28: set_channel('SPECIAL2',-1,210,0);
29: set_channel('SPECIAL2',-1,220,0);
30: set_channel('SPECIAL2',-1,225,0);
31: set_channel('SPECIAL2',-1,230,0);
32: set_channel('SPECIAL2',-1,240,0);
33: set_channel('SPECIAL2',-1,245,0);
34: set_channel('SPECIAL2',-1,250,0);
35: set_channel('SPECIAL2',-1,255,0);
end;
end;
procedure special1change;
begin
DontRefresh:=true;
set_channel('special1',-1,special1slider0.position,0);
end;
procedure ColorPickerChange(R, G, B: Byte);
begin
set_channel('r',-1,r,0);
set_channel('g',-1,g,0);
set_channel('b',-1,b,0);
set_channel('c',-1,255-r,0);
set_channel('m',-1,255-g,0);
set_channel('y',-1,255-b,0);
end;
procedure SwitchColorPicker;
begin
if colorpicker.visible then
begin
colorpicker.visible:=false;
colorpicker2.visible:=true;
end else
begin
colorpicker.visible:=true;
colorpicker2.visible:=false;
end;
end;
procedure special2change;
begin
DontRefresh:=true;
set_channel('special2',-1,special2slider4.position,0);
end;
procedure speedchange;
begin
DontRefresh:=true;
set_channel('speed',-1,speedslider5.position,0);
end;
end.