Announcement

Collapse
No announcement yet.

RR plugin written in C#

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • RR plugin written in C#

    I want to use the SetSlider function that doesn't exist into the C# example !
    What do i must to add ?

    I have added into the IRRExtension.cs file:
    long SetSlider(ref string SLD, ref int Value, ref bool Direction);
    and into my RRExtension.cs file:
    /// <summary>
    ///
    /// </summary>
    /// <param name="SLD"></param>
    /// <returns>-1 for not processed</returns>
    public long ReturnSlider(ref string SLD)
    {

    switch (SLD.ToLower())
    {
    // SETTINGS
    case "rrcoretemp_updatedelay":
    return ((UpdateDelay / 10) * 65535);

    case "rrcoretemp_maxtemp_alarm":
    return ((((CoreTempAlarm - 9) * 10) * 65535) / 20);

    }
    return -1;
    }

    ...

    public long SetSlider(ref string SLD,ref int Value, ref bool Direction)
    {
    return -1;
    switch (SLD.ToLower())
    {
    // SETTINGS
    case "rrcoretemp_maxtemp_alarm":
    CoreTempAlarm = Convert.ToInt32((Value * 20) / 65535);

    case "rrcoretemp_updatedelay":
    UpdateDelay = Convert.ToInt32((Value * 10) / 65535);
    }
    }
    Is it the good way!

    Mitchjs, can you add these function into the C# example please ?
Working...
X