First version. Saves target t to flash, features cut-off by relay temperature.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
if (scalar(@ARGV) < 1)
|
||||
{
|
||||
die("Usage: make_config.pl HEATER_NAME");
|
||||
}
|
||||
my $name = shift @ARGV;
|
||||
|
||||
Process("heater_v3.things", $name.".things");
|
||||
Process("heater_v3.items", $name.".items");
|
||||
|
||||
sub Process
|
||||
{
|
||||
my $src = shift;
|
||||
my $dst = shift;
|
||||
my $fh;
|
||||
open($fh, "< ".$src);
|
||||
my $ofh;
|
||||
open($ofh, "> ".$dst);
|
||||
while (<$fh>)
|
||||
{
|
||||
$_ =~ s/HEATER_NAME/$name/g;
|
||||
print($ofh $_);
|
||||
}
|
||||
close($fh);
|
||||
close($ofh);
|
||||
}
|
||||
Reference in New Issue
Block a user