Hello Guest it is April 23, 2024, 06:03:24 AM

Author Topic: Screen Set Ideas  (Read 184927 times)

0 Members and 1 Guest are viewing this topic.

Re: Screen Set Ideas
« Reply #250 on: December 23, 2014, 09:28:14 AM »
Merry Christmas for Darwin users.

I have posted a stripped down wizard to help your setups. (did not use a cvs file in this version)

Also was informed by Art that he will be including it in future Darwin Installs, (thanks Art)  ;D
That's my Christmas gift  8)

This goes in your Wizard folder and you just enter in the counts and velocities for all motor you setup.
Does not store anything just gives you some additional help and understanding of Darwin setups.

And a shout out to poppabear for turning me on to lua grids.

Update: wasn't festive enough, added some color  ::)
Thanks scott

« Last Edit: December 23, 2014, 10:45:26 AM by Ya-Nvr-No »

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Screen Set Ideas
« Reply #251 on: December 23, 2014, 09:59:23 AM »
Thanks Craig!
Sweet work on the Darwin Set up!

Scott
fun times

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Screen Set Ideas
« Reply #252 on: December 23, 2014, 01:12:32 PM »
nice work

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Screen Set Ideas
« Reply #253 on: December 24, 2014, 10:55:13 AM »
Thanks Craig

(;-) TP
Re: Screen Set Ideas
« Reply #254 on: December 24, 2014, 08:13:16 PM »
Merry Christmas to ALL

Here is a RPM calculator wizard, like I had shown earlier (post #244)

Functional and they are also to show you how they are done.

Happy Holidays

« Last Edit: December 24, 2014, 08:17:20 PM by Ya-Nvr-No »

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Screen Set Ideas
« Reply #255 on: December 25, 2014, 04:12:01 AM »
top man Ill put you down for a pay rise

and Merry Christmas to you
Re: Screen Set Ideas
« Reply #256 on: December 25, 2014, 02:38:51 PM »
Here is an example of how to use a function with a nested loop to "get" the cells value, pass it with its cell location to a function that sets colors based on what it is.

Code: [Select]
-- this is found toward the beginning of the wizard file, as it has to have been recognized and read before it can be called
function setcolors(rating,r,c)
    if (rating == "R") then
        LumberChartGrid:SetCellBackgroundColour(r, c, wx.wxColour(35,170,35))--green
    elseif (rating == "N") then
        LumberChartGrid:SetCellBackgroundColour(r, c, wx.wxColour(240,240,100))--yellow
    elseif (rating == "E") then
        LumberChartGrid:SetCellBackgroundColour(r, c, wx.wxColour(240,0,0))--red
    elseif (rating == "G") then
        LumberChartGrid:SetCellBackgroundColour(r, c, wx.wxColour(240,240,100))--yellow
    elseif (rating == "F") then
        LumberChartGrid:SetCellBackgroundColour(r, c, wx.wxColour(35,170,35))--green
    elseif (rating == "P") then
        LumberChartGrid:SetCellBackgroundColour(r, c, wx.wxColour(100,230,230))--cyan
    elseif (rating == "Weak") then
        LumberChartGrid:SetCellTextColour(r, c, wx.wxColour(100,230,230))
    elseif (rating == "Light") then
        LumberChartGrid:SetCellTextColour(r, c, wx.wxColour(35,170,35))
    elseif (rating == "Medium") then
        LumberChartGrid:SetCellTextColour(r, c, wx.wxColour(150,150,150))
    elseif (rating == "Soft") then
        LumberChartGrid:SetCellTextColour(r, c, wx.wxColour(140,240,100))
    elseif (rating == "Strong") then
        LumberChartGrid:SetCellTextColour(r, c, wx.wxColour(240,140,100))
    elseif (rating == "Hard") then
        LumberChartGrid:SetCellTextColour(r, c, wx.wxColour(0,0,0))--black
    elseif (rating == "Heavy") then
        LumberChartGrid:SetCellTextColour(r, c, wx.wxColour(240,0,0))--red
    end
end

function getcolors()
    local rownum = 0
    local colnum = 0
    local rating = "Ya-Nvr-No"
    for rownum = 0, 20 do --Loop through 21 rows
        for colnum = 2, 16 do --Loop through 15 columns
            local rating = LumberChartGrid:GetCellValue(rownum, colnum)
            setcolors(rating,rownum,colnum) -- set the color
        end
    end
end

--and then this will call the feature so I can use it at load and during editing
getcolors()
« Last Edit: December 25, 2014, 03:44:50 PM by Ya-Nvr-No »
Re: Screen Set Ideas
« Reply #257 on: December 26, 2014, 01:08:59 PM »
There's another 20+ hours to figure out how to read each cell and then write to the csv file; and add framing features to the spreadsheet grid.
So now its sizable and I can add menu features.

NOTHING but a PITA  ;D
but it is possible

The trick to lua programming is using the debug features like break points (F9) and stepping (F11) and Start/Continue (F5) and saving the file before you run/test it, because it will crash and leave ya hard without a  :-*

I try to save it as a new revision level name and then run it. That way I can always go back to the one that worked.

POS... POS ... POS
 >:D

Re: Screen Set Ideas
« Reply #258 on: December 27, 2014, 07:15:01 AM »
Now that I created this template, I can start creating all kinds of functional popup Charts.
All by reading a text file separated with commas.
Re: Screen Set Ideas
« Reply #259 on: December 27, 2014, 09:08:00 AM »
Looking good.

Mike
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.