Magnus replied to the topic 'Feature DustCap cange to FlatCap and DarkCap' in the forum. 2 days ago

I have nov installed my new dustcaps on main and guide scope.

Shot a 16sec video on the caps opening and closing, so tought I should share :)

[video]

Read More...

Magnus replied to the topic 'help on indi wiringPi gpio crash' in the forum. 3 days ago

Good to hear you have a working version now.

I don't have time to look at it in a while, but if you have parts of the proc/sysinfo in that object (witch is read in the sysinfo class) , then there is some memory / pointer issue.

The object or a variable within seam to be pointing at the wrong memory address, or perhaps delete has been executed, but the object is still being used. Or there could be a non terminated c string somwhere.

These are things that makes c / c++ more challenging to code, than many other languages.

Don't really know how this could happen on Gentoo and not Raspbian. Perhaps Valgrind can give som info about memory use.

Read More...

Magnus replied to the topic 'help on indi wiringPi gpio crash' in the forum. 4 days ago

Ok, so I spotted something.

As the InputDigitalLP, OutputDigitalLP and OutputPWMNP variables is only created and not initialized, they should not be initialized in the initProperties(), no matter what.
They should be initialized in the constructor.

In wiringpi_gpio.cpp line 78, I change the constructor to:

WiringPiGPIO::WiringPiGPIO()
{
    for (int i = 0; i < NUMBER_OF_PINS; i++)
    {
        InputDigitalLP[i] = new ILightVectorProperty;
        OutputDigitalSP[i] = new ISwitchVectorProperty;
    }
    OutputPWMNP = new INumberVectorProperty;

    setVersion(0,1);
    setDriverInterface(AUX_INTERFACE);
}
And remove the InputDigitalLP, OutputDigitalLP and OutputPWMNP = new in initProperties().

When this is done, it should not be possible for those IVectorProperties to be undefined.

This is the correct way to to it, so I will push a update to the repository anyway. Should be there to test tomorrow.
Let me know if it solves anything. :unsure:

Read More...

Magnus replied to the topic 'help on indi wiringPi gpio crash' in the forum. 4 days ago

That's good.
Do you see it on bothe the Gentoo and raspbian?

I'm sort of hoping it's not there on the Gentoo, but only on the raspbian. It would explane whats going on.

I do doubt it thoug, as none of the tabs would be there. Only default Main tab, and Options.

Looks like we figure out new things all the time, but nothing is really a solution.... :)

Read More...

Magnus replied to the topic 'help on indi wiringPi gpio crash' in the forum. 4 days ago

Try adding:

DEBUG(INDI::Logger::DBG_SESSION, strdup("***** INIT *****"));
as the first line after initProperties()

Init is not called on connection, but when Indiserver starts.
start with indiserver -vv indi_wiringpi_gpio, and you should see this.

Example from usbrelay2_roof
indiserver -vv indi_usbrelay2_roof
2017-08-17T15:34:23: startup: indiserver -vv indi_usbrelay2_roof 
2017-08-17T15:34:23: Driver indi_usbrelay2_roof: pid=24201 rfd=3 wfd=6 efd=7
2017-08-17T15:34:23: listening to port 7624 on fd 4
2017-08-17T15:34:23: Driver indi_usbrelay2_roof: sending <getProperties version='1.7'/>

2017-08-17T15:34:23: Driver indi_usbrelay2_roof: ***** INIT *****
2017-08-17T15:34:23: Driver indi_usbrelay2_roof: read <getProperties device='Telescope Simulator' name='EQUATORIAL_EOD_COORD'>
2017-08-17T15:34:23: Driver indi_usbrelay2_roof: snooping on Telescope Simulator.EQUATORIAL_EOD_COORD


Read More...

Magnus replied to the topic 'help on indi wiringPi gpio crash' in the forum. 4 days ago

I think you should open a new thread: initProperties() not executed on Gentoo linux.

This issue seams to have it's root in how INDILib works on your system, and does not seam to be related to any spesific driver.

How this can work different on Gentoo, I don't know, but youre more likely to get help on that spesific issue in a new thread. (wiringPi gpio is not even official 3rdParty driver in the repository :) )

Read More...

Magnus replied to the topic 'help on indi wiringPi gpio crash' in the forum. 5 days ago

Im at work, so must keep it short.

If the for loop with the New does not run before 287, then the InputLightLP is completely undefined.

The Init() should run before updateProperties()

Read More...

Magnus replied to the topic 'help on indi wiringPi gpio crash' in the forum. 5 days ago

So on line 287 you have

if (InputDigitalLP[i]->lp != NULL)
    defineLight(InputDigitalLP[i]);

For some reason InputDigitalLP->lp is NOT NULL.
However this is the input light property for the main tab.
With no inputs defined (new config file) this should be NULL.
For some reason it's not NULL, but in some way undefined, and chrashes defaultdevice in the ISNewLight function.

Try to set a breakpoint in the if statement and see what InputDigitalLP really is, an why ->lp is NOT NULL.

Read More...

Magnus replied to the topic 'help on indi wiringPi gpio crash' in the forum. 7 days ago

Hmmm. Have not debugged c++ in a while, but there is one thing.

All the traces that are within WiringPiGPIO is related to the connection switch being pressed, except

#5  0x00018fa4 in WiringPiGPIO::updateProperties (this=0x288038)
      at /home/pi/build/indi_wiringpi_gpio/wiringpi_gpio/wiringpi_gpio.cpp:287
This is from defining a light property.
if (InputDigitalLP[i]->lp != NULL)
    defineLight(InputDigitalLP[i]);
The only thing I can think of with this, is that I delete that property before defining it, as the main tab will change depending on what switches are defined in the config.

Just to be sure, could you try to comment out these lines
            // Dynamic properties must be "redifined" to be kept in order and avoid duplicate
            deleteProperty(InputDigitalLP[i]->name);
            deleteProperty(OutputDigitalSP[i]->name);
They are line 276, 277 and 278 in wiringpi_gpio.cpp
I would not bet on that i will help, but if deleteProperty is working in a different way than when I have been testing, than this could have something to do with the bug.

Read More...

Magnus replied to the topic 'help on indi wiringPi gpio crash' in the forum. 7 days ago

Hi Paule.

This might be good info. All the INDI specific code should work just as well on Gentoo and raspbian.
However there is some code in the wiringpi_gpio/systeminfo.cpp file, that I'm not certain will work on Gentoo (I have newer used Gentoo, so not tested).

Could you try to uncomment line 501 in wiringpi_gpio.cpp, so it looks like

void WiringPiGPIO::TimerHit()
{
    //  No need to reset timer if we are not connected anymore 
    if (!isConnected()) return;    

    wiPiUpdater.UpdateAllRead(InputDigitalLP);
    if (timer > 2500)
    {
        //sysinfoUpdater.UpdateDynamicProperties();
        timer = 0;
    }
    timer += 250;
    SetTimer(250);
}
and then recompile on your Gentoo Pi.
If it's code in the SystemInfo class that fails, then this is the only point it will be called from.

Read More...

Magnus replied to the topic 'Building the induino MeteoStation with 3d printed housing' in the forum. 1 week ago

Project is comming along, all sensors vorking :)

I did have to order a new IR temp sensor, as I managed to fry the first I got.
I also had to update the METEOTest and InduinoMETEO firmware. The original library for the pressure sensor only supported BMP085 and not BMP185.
The code for the IR sensor was also just crashing the program when it failed to read the sensor, making hard to debug.

The METOTest was actually for the most part crashing when a sensor failed, making it hard to debug witch semsor failed, so I have rewritten a lot of the test.

Now that all sensors are workig, I did come across a issu that wil make me redesign the top 3d printed part.
The IR sensor cannot read temperature trough the plexi / pastic glass. So the IR sensor only reports the temperature of the glass itself.

I have some ideas on how to fix it, just have to mke sure it does not make water come in to the box. (as the sensor needs to be in open air facing up

The new test firmware



Read More...

Chris Howard thanked Magnus in topic Observatory 17b 2 weeks ago
Magnus replied to the topic 'Building the induino MeteoStation with 3d printed housing' in the forum. 1 month ago

So, I'm calling this a success for the build :)

Everything is up and running except the IR sensor. I did not check everything well enough before ordering, so I got the BAA version witch is 3.3V. I connected it to the Arduino and it got hot very fast. A 20 and a 30 Ohm resistor will drop th supply voltage down to 3,3v, so I'll install the IR sensor when i can source some resistors.

I have been testing it for a while now, and sensors seam to work well. I also set up the web interface on my dev machine, and that was not hard at all. I did have to change some pins in the induinoMETEO firmware as the Adrafruit Pro trinket is using pin 2 internally. I'll go into some detail on that when I write the howto.

Also the question I had about the pressure and IR sensor using the same pins, seams to be correct. The pins are not standard analouge inputs, but SDA and SCL, witch is analouge modulated inputs.

Some pictures of the read outs and the nice Web interface for now.









Read More...

Magnus replied to the topic 'Should I just ditch the StarShoot (QHY5) autoguide camera?' in the forum. 1 month ago

I have been struggling with the SSAG all winter, so thanks for the update.

I found that disabling two axis calibration will let it calibrate, but if any process aborts a exposure then it's a server reboot.
I thing it is something like "SingleFrameCaptureError(-1)".

As it's the weakest link in my obsy, I'll be saving up for the lodestar.
I do think I recall the Lodestar 1x is working great as well, so I might go for that to keep cost down. (I just installed my ST80 as a guide scope for my Equinox 80, so slight overkill already :) )

Read More...

Magnus replied to the topic 'Building the induino MeteoStation with 3d printed housing' in the forum. 2 months ago

So now I have nearly everything I need, and I'm making some progress.

Final shopping list:

  1. 2mm tich acryllic glass www.clasohlson.com/no/Akrylplast/Pr341360000
  2. Roll of PETG printer filament
  3. Adafruit pro trinket www.kjell.com/no/produkter/elektro-og-ve...tviklingskort-p87968
  4. Serial to USB www.kjell.com/no/produkter/elektro-og-ve...b-til-seriell-p87898
  5. Solar cell lamp www.clasohlson.com/no/Solcellelampe-3-pack/36-6488-2
  6. BMP 180 Barometric Pressure sensor ebay id : 201414876396
  7. DHT22 AM2303 Temp / Humidity sensor ebay id: 171907229178
  8. MLX90614ESF-BAA IR temp sensor ebay id: 191869849584

I have to get the Usb to serial adapter tomorrow, but the rest is in house.
Compiling and uploading the firmware to the Arduino was a breeze. I did not initially realize that all the code for the induino was in the INDI driver and all the arduino does is allowing a host computer to control the IO with the firmata protocol.

The Adafruit pro trinket does not support serial commands over the usb port, so that's why I need the dongle.

Last thing that is puzzling me is that the same pin is used for the output from both the BMP085 (185) and the IR sensor? Is this correct or just to show that both should be connected to analogue input on the arduino?

See blue and purple wires on this schematics
meteostation_bb.jpg

I feel my electronics skills is lacking a bit here. It's not like the output from one goes into the other and is altered, and the outputs are in paralell, so not like they will combine, and output higher amplitude. Looks like the sensor with the strongest output will be the resulting analogue signal?

Read More...

pauledd thanked Magnus in topic DIY Flatfield Dustcover with RPi 2 months ago

Login

3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!