Tannoo / Marlin

Optimized firmware for RepRap 3D printers based on the Arduino platform.
http://www.marlinfw.org/
GNU General Public License v3.0
1 stars 0 forks source link

UBL character radar code #7

Closed Tannoo closed 7 years ago

Tannoo commented 7 years ago

Removed

Roxy-3D commented 7 years ago

The full MSVC Project is .ZIP'd up and on its way to you...

Tannoo commented 7 years ago

Got it.

Tannoo commented 7 years ago

Do you have a file that's close to Marlin ready?

If not, I'll plug away at it, but you may end up doing it. lol I work all weekend, so my time on this will be limited.

Tannoo commented 7 years ago

Looks like Draw_Mesh_Map.cpp and LCD_display.cpp.

Roxy-3D commented 7 years ago

Nothing that is ready to plug in and compile.... I have the code fully debugged... But it is not adapted to a Marlin environment.

If you keep your progress committed I can pick up from where ever you leave it and together, it shouldn't take that long to get it going.

On Wed, Jul 5, 2017 at 11:03 AM, Tannoo notifications@github.com wrote:

Do you have a file that's close to Marlin ready?

If not, I'll plug away at it, but you may end up doing it. lol I work all weekend, so my time on this will be limited.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Tannoo/Marlin/issues/7#issuecomment-313148542, or mute the thread https://github.com/notifications/unsubscribe-auth/AIA9YulsetMJ2yUVQWgicUn9r9pHvMfzks5sK7PkgaJpZM4OOh0T .

Roxy-3D commented 7 years ago

ignore LCD_display.cpp that is only there to give me the ability to use lcd. type commands.... That entire file goes away.

On Wed, Jul 5, 2017 at 11:08 AM, Roxanne Neufeld < roxanne.rae.neufeld@gmail.com> wrote:

Nothing that is ready to plug in and compile.... I have the code fully debugged... But it is not adapted to a Marlin environment.

If you keep your progress committed I can pick up from where ever you leave it and together, it shouldn't take that long to get it going.

On Wed, Jul 5, 2017 at 11:03 AM, Tannoo notifications@github.com wrote:

Do you have a file that's close to Marlin ready?

If not, I'll plug away at it, but you may end up doing it. lol I work all weekend, so my time on this will be limited.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Tannoo/Marlin/issues/7#issuecomment-313148542, or mute the thread https://github.com/notifications/unsubscribe-auth/AIA9YulsetMJ2yUVQWgicUn9r9pHvMfzks5sK7PkgaJpZM4OOh0T .

Tannoo commented 7 years ago

20x4.h and 20x4-LCD-Mesh-Plot.cpp?

Tannoo commented 7 years ago

It looks as though the main guts are in Draw_Mesh_Map.cpp.

I am just trying to figure out what files are the ones to work with.

Tannoo commented 7 years ago

Nope, it looks like 20x4-LCD-Mesh-Plot.cpp and Draw_Mesh_Map.cpp.

Roxy-3D commented 7 years ago

Yes... All of the logic is in Draw_Mesh_Map.cpp There are a couple of support routines the main routine calls that are also in that file. But all the printf()'s can be remove. And the several lines of nested loops to clear the display should be converted to a lcd.clear() or what ever it is....

And the .h file can be shrunk too...

Incidentally... If you are on a Windows machine... You should be able to run the .exe file that will be in one of the Debug directories. But if you just want to look at the output, that is in the tmp.txt file in on of the Debug directories.

On Wed, Jul 5, 2017 at 11:16 AM, Tannoo notifications@github.com wrote:

It looks as though the main guts are in Draw_Mesh_Map.cpp.

I am just trying to figure out what files are the ones to work with.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Tannoo/Marlin/issues/7#issuecomment-313152220, or mute the thread https://github.com/notifications/unsubscribe-auth/AIA9YnpG0eoYJio_XGVNN7khAvksK-fiks5sK7b1gaJpZM4OOh0T .

Tannoo commented 7 years ago

I tried to run the exe and I got dependency errors. Stuff not installed on my computer.

Roxy-3D commented 7 years ago

The main program .cpp file can be discarded too. That was just there to set the mesh size to each possible combination, and to call the routine to plot each mesh point location.

On Wed, Jul 5, 2017 at 11:20 AM, Roxanne Neufeld < roxanne.rae.neufeld@gmail.com> wrote:

Yes... All of the logic is in Draw_Mesh_Map.cpp There are a couple of support routines the main routine calls that are also in that file. But all the printf()'s can be remove. And the several lines of nested loops to clear the display should be converted to a lcd.clear() or what ever it is....

And the .h file can be shrunk too...

Incidentally... If you are on a Windows machine... You should be able to run the .exe file that will be in one of the Debug directories. But if you just want to look at the output, that is in the tmp.txt file in on of the Debug directories.

On Wed, Jul 5, 2017 at 11:16 AM, Tannoo notifications@github.com wrote:

It looks as though the main guts are in Draw_Mesh_Map.cpp.

I am just trying to figure out what files are the ones to work with.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Tannoo/Marlin/issues/7#issuecomment-313152220, or mute the thread https://github.com/notifications/unsubscribe-auth/AIA9YnpG0eoYJio_XGVNN7khAvksK-fiks5sK7b1gaJpZM4OOh0T .

Tannoo commented 7 years ago

And that "main" is the one with the main() function in it, I'm sure.

Roxy-3D commented 7 years ago

You probably would need to install the MSVC run time library. But... You don't need to run it. You can just look at the tmp.txt file to see what it does.

On Wed, Jul 5, 2017 at 11:23 AM, Roxanne Neufeld < roxanne.rae.neufeld@gmail.com> wrote:

The main program .cpp file can be discarded too. That was just there to set the mesh size to each possible combination, and to call the routine to plot each mesh point location.

On Wed, Jul 5, 2017 at 11:20 AM, Roxanne Neufeld < roxanne.rae.neufeld@gmail.com> wrote:

Yes... All of the logic is in Draw_Mesh_Map.cpp There are a couple of support routines the main routine calls that are also in that file. But all the printf()'s can be remove. And the several lines of nested loops to clear the display should be converted to a lcd.clear() or what ever it is....

And the .h file can be shrunk too...

Incidentally... If you are on a Windows machine... You should be able to run the .exe file that will be in one of the Debug directories. But if you just want to look at the output, that is in the tmp.txt file in on of the Debug directories.

On Wed, Jul 5, 2017 at 11:16 AM, Tannoo notifications@github.com wrote:

It looks as though the main guts are in Draw_Mesh_Map.cpp.

I am just trying to figure out what files are the ones to work with.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Tannoo/Marlin/issues/7#issuecomment-313152220, or mute the thread https://github.com/notifications/unsubscribe-auth/AIA9YnpG0eoYJio_XGVNN7khAvksK-fiks5sK7b1gaJpZM4OOh0T .

Tannoo commented 7 years ago

Okay, this is what I have so far: https://github.com/Tannoo/Marlin/tree/ubl_20x4_radar_integration

It doesn't compile yet. There are some issues with lcd.customChar() declarations. I think I have everything needed.

I created this branch for getting it working because the other branch has an active PR. This one does not. Once this one compiles and works, I'll apply the changes to the other branch.

Roxy-3D commented 7 years ago

It doesn't compile yet. There are some issues with lcd.customChar() declarations. I think I have everything needed.

I can get that cleaned up for you pretty easily... Let me take a look... And, you may not have noticed... But I was careful not to have any globally declared custom characters. And only one on the stack frame that gets used over and over and then discarded when the function exits.

It now compiles and links cleanly (for a 20x4 LCD Panel).

It is super close. But somehow the right edge line is getting added to the left part of the mesh point. I need to write a small routine to dump the number-4 custom character at various points in the routine to see where (and how) it is getting corrupted. I'll feel more like doing that tomorrow.... But the good news is everything else you have seems to be working. I can spin the dial and move from pixel to pixel and the nozzle moves where it is supposed to. So it isn't that far off.

Roxy-3D commented 7 years ago

I got it working... But I don't know how to get your X, Y and Z data along with the Mesh Point index to plot.... I'm going to leave that because I have a hunch it will take all of 5 minutes to get that wired up.

It even lets you click to edit a point. I think it is very close. But we probably need to scrub the code and get all the indentation correct.

Tannoo commented 7 years ago

Ok.. cool. I'll get the other info on the screen. No big deal. I left them off for simplicity to get the more complicated stuff in there.

Tannoo commented 7 years ago

I'll do that in the morning.

Tannoo commented 7 years ago

So, does this plotting work down to 16x3?

I ask, so I can get it set appropriately.

Tannoo commented 7 years ago

Or just the 16 and 20 x4's?

Roxy-3D commented 7 years ago

NO! Right now UBL has a limit of up to 15 for X & Y. That simplifies a whole bunch of big data types. 3x3 to 15x15. And that tmp.txt file has every mesh pixel plot of what is expected in it. You are going to see some clever optimizations on what can be filled in as the dot moves.

Roxy-3D commented 7 years ago

Or just the 16 and 20 x4's?

Its totally untested. But you should be able to add or subtract characters on any row. And you should be able to bump it down to 20x2. (but you would have to put multiple X, Y & Z things on the same line.)

Tannoo commented 7 years ago

I just needed to know which displays we want to use it on. Not the mesh size.

Roxy-3D commented 7 years ago

Well... I have a generic 20 x 4 on that FolgerTech i3-2020. It is working. I'm sure there is something that still needs work. But if you get the X, Y & Z numbers with the mesh index on the screen... I'm thinking we merge it.

Tannoo commented 7 years ago

Ok. For now, I'll make it only work for the 20x4 lcds. We'll figure out the rest.

One step at a time.

Tannoo commented 7 years ago

I should be able to get that and test it in the morning.

Roxy-3D commented 7 years ago

The dot moves very nicely across the radar screen. And the nozzle is pretty responsive. You can time the speed you rotate the dial to make the nozzle self correct and just head up the center of the bed.

Tannoo commented 7 years ago

Yeah.. it's interesting.

Again, I want to thank you for your help on this.

Roxy-3D commented 7 years ago

You are very welcome.

Tannoo commented 7 years ago

You didn't commit any changes here: https://github.com/Tannoo/Marlin/tree/ubl_20x4_radar_integration

Roxy-3D commented 7 years ago

Somehow... I goofed up and ended up with a branch forked from yours. All of the changes are at: https://github.com/Roxy-3D/ubl_20x4_radar_integration I think we can just take the Ultra Files from that branch and update those same files in your branch.

Lets see if I can fix that...

Tannoo commented 7 years ago

I will snag it.

Roxy-3D commented 7 years ago

I already moved the stuff to your branch... I'm wondering if the Radar Map stuff should be moved out of Mesh-Output and to a higher level. Maybe call it Mesh-Edit ????

Tannoo commented 7 years ago

Ok.

Roxy-3D commented 7 years ago

Let me know when you have had a chance to check it out....

Tannoo commented 7 years ago

Okay... I have and a few corrections to do, if possible.

Tannoo commented 7 years ago

The bottom left is drawing correctly, only if the plot is 2 or less on x and y.

Tannoo commented 7 years ago

Same with all four corners.

Tannoo commented 7 years ago

Lemme get some pics.

Tannoo commented 7 years ago

I will also compare again, against your code. Just in case I screwed something up.

Roxy-3D commented 7 years ago

What mesh size do you have? I have 10x10. I'll load the firmware from your site to make sure we are looking at the same thing.

Tannoo commented 7 years ago

Same 10x10.

I have not uploaded my changes yet.... It's working, I am currently formatting it. Close, anyway for now.

Roxy-3D commented 7 years ago

OK... It sounded like there was a problem and you were trying to describe when it didn't work.

Tannoo commented 7 years ago

It works, but there is a problem.

Tannoo commented 7 years ago

The border characters for the corners.

Tannoo commented 7 years ago

Okay, I have committed my changes and it is sync'd.

I'll have to get the pics a little later as I have to get some sleep before work again.

Roxy-3D commented 7 years ago

There can only be a 'corner' if the Mesh Point is close to a corner. Other wise... It does the best it can.

Roxy-3D commented 7 years ago

The reason is... Two custom char's are used for the top and bottom line. and two for the left and right line.

And we need 4 char's in certain locations to plot the mesh point. So that takes up all the custom char's.

Tannoo commented 7 years ago

Okay... I thought it was either something I did, or something gone weird.