Skip to content

Commit

Permalink
fix error "write-host $config" join with 2 arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Quake4 committed Apr 18, 2018
1 parent ad59e93 commit 1525c6e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Code/Config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Config : BaseConfig {
static [int] $Processors = 0
static [int] $Cores = 0
static [int] $Threads = 0
static [string] $Version = "v1.54"
static [string] $Version = "v1.55"
static [string] $BinLocation = "Bin"
static [eMinerType[]] $ActiveTypes
static [string[]] $CPUFeatures
Expand Down Expand Up @@ -161,14 +161,14 @@ class Config : BaseConfig {
$this.Wallet | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty Name | ForEach-Object {
$result += $pattern2 -f "Wallet $_", $this.Wallet."$_"
}
$features = if ([Config]::CPUFeatures) { [string]::Join(", ", [Config]::CPUFeatures) } else { [string]::Empty }
$types = if ([Config]::ActiveTypes) { [string]::Join(", ", [Config]::ActiveTypes) } else { [string]::Empty }
$result += $pattern2 -f "Timeout Loop/Check/NoHash", ("{0} sec/{1} sec/{2} min" -f $this.LoopTimeout, $this.CheckTimeout, $this.NoHashTimeout) +
$pattern2 -f "Average Hash Speed/Current", ("{0}/{1} sec" -f $this.AverageHashSpeed, $this.AverageCurrentHashSpeed) +
$pattern2 -f "OS 64Bit", [Config]::Is64Bit +
$pattern2 -f "CPU & Features", ("{0}/{1}/{2} Procs/Cores/Threads & {3}" -f [Config]::Processors, [Config]::Cores, [Config]::Threads,
[string]::Join(", ", [Config]::CPUFeatures)) +
$pattern3 -f "Active Miners", [string]::Join(", ", [Config]::ActiveTypes), " <= Allowed: $([string]::Join(", ", $this.AllowedTypes))" +
$pattern2 -f "CPU & Features", ("{0}/{1}/{2} Procs/Cores/Threads & {3}" -f [Config]::Processors, [Config]::Cores, [Config]::Threads, $features) +
$pattern3 -f "Active Miners", $types, " <= Allowed: $([string]::Join(", ", $this.AllowedTypes))" +
$pattern2 -f "Region", $this.Region
#$pattern2 -f "Verbose level", $this.Verbose
return $result
}

Expand Down
6 changes: 3 additions & 3 deletions Code/Get-Config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ function Get-Config {
if ($cfg) {
# remove from static constructor of [Config] to remove deadlock
[Config]::CPUFeatures = Get-CPUFeatures ([Config]::BinLocation)
[Config]::AMDPlatformId = Get-AMDPlatformId ([Config]::BinLocation)
[Config]::RateTimeout = [HumanInterval]::Parse("1 hour")
# filter has by allowed types
[Config]::ActiveTypes = [Config]::ActiveTypes | Where-Object {
$cfg.AllowedTypes -contains $_
[Config]::ActiveTypes = [Config]::ActiveTypes | Where-Object { $cfg.AllowedTypes -contains $_ }
if ([Config]::ActiveTypes -contains [eMinerType]::AMD) {
[Config]::AMDPlatformId = Get-AMDPlatformId ([Config]::BinLocation)
}
# set default value if empty
if (!$cfg.Currencies -or $cfg.Currencies.Count -eq 0) {
Expand Down
2 changes: 1 addition & 1 deletion MindMiner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ while ($true)
}

# filter by exists hardware
$AllMiners = $AllMiners | Where-Object { [array]::IndexOf([Config]::ActiveTypes, ($_.Type -as [eMinerType])) -ge 0 }
$AllMiners = $AllMiners | Where-Object { [Config]::ActiveTypes -contains ($_.Type -as [eMinerType]) }

# download miner
if ($DownloadJob -and $DownloadJob.State -ne "Running") {
Expand Down

0 comments on commit 1525c6e

Please sign in to comment.