×

INDI Library v1.9.3 Released (11 Nov 2021)

Bimonthly Stable INDI Library release introduces new drivers and fixes for existing ones. Some highlights:

I need help to connect the pyxis driver to my arduino code !!

  • Posts: 197
  • Thank you received: 3
Hello
So, indeed I would like to adapt an arduino code for this driver.
I already have the one for the driver, but it is too complicated because it is also for a focuser, so I would like to try to make a simpler one.

And my second question is to know if there is a way to modify the nightcrawler driver to make a simpler one, just for a rotator.

Like for example:
I would just need in the configurations, the "HOME" with the position that we want (from 0 to 360 °) to choose.
And to be able to do it either by pressing a button, or, automatically at the beginning of its use.

I don't know if it's possible

See you soon
Christophe
1 month 3 weeks ago #76623

Please Log in or Create an account to join the conversation.

Just copy over the nightcrawler.h & cpp files and edit them accordingly to remove the unnecessary bits. Of course, you need to have some understand of INDI code, but it's mostly straight forward.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 month 3 weeks ago #76630

Please Log in or Create an account to join the conversation.

  • Posts: 197
  • Thank you received: 3
Last edit: 1 month 3 weeks ago by Porchet.
1 month 3 weeks ago #76636

Please Log in or Create an account to join the conversation.

  • Posts: 197
  • Thank you received: 3
Hello Jasem
then this is my problem, I'm really not expert in indi code, but if I look at the nightcrawler.h code there is a lot of parts I could remove, I think, that have nothing to do with the rotator, like ...

// Focus Sync
IUFillNumber(&SyncFocusN[0], "FOCUS_SYNC_OFFSET", "Ticks", "%.f", 0, 100000., 0., 0.);
IUFillNumberVector(&SyncFocusNP, SyncFocusN, 1, getDeviceName(), "FOCUS_SYNC", "Sync", MAIN_CONTROL_TAB, IP_RW, 0,
IPS_IDLE );

// Voltage
IUFillNumber(&VoltageN[0], "VALUE", "Value (v)", "%.2f", 0, 30., 1., 0.);
IUFillNumberVector(&VoltageNP, VoltageN, 1, getDeviceName(), "Voltage", "Voltage", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE );

// Temperature
IUFillNumber(&TemperatureN[0], "TEMPERATURE", "Value (C)", "%.2f", -100, 100., 1., 0.);
IUFillNumberVector(&TemperatureNP, TemperatureN, 1, getDeviceName(), "FOCUS_TEMPERATURE", "Temperature", MAIN_CONTROL_TAB,
IP_RO, 0, IPS_IDLE );

// Temperature offset
IUFillNumber(&TemperatureOffsetN[0], "OFFSET", "Offset", "%.2f", -15, 15., 1., 0.);
IUFillNumberVector(&TemperatureOffsetNP, TemperatureOffsetN, 1, getDeviceName(), "TEMPERATURE_OFFSET", "Temperature",
MAIN_CONTROL_TAB, IP_WO, 0, IPS_IDLE );

// Motor Step Delay
IUFillNumber(&FocusStepDelayN[0], "FOCUS_STEP", "Value", "%.f", 7, 100., 1., 7.);
IUFillNumberVector(&FocusStepDelayNP, FocusStepDelayN, 1, getDeviceName(), "FOCUS_STEP_DELAY", "Step Rate", SETTINGS_TAB,
IP_RW, 0, IPS_IDLE );


On the other hand I can't find the function that kstars sends to the arduino to tell it to do the GoHome

I'm not sure if you have the time to do it, but I'm sure you can figure out how to do it, so I'm not sure if you have the time.

Thanks again
Christophe
1 month 3 weeks ago #76637

Please Log in or Create an account to join the conversation.

  • Posts: 197
  • Thank you received: 3
Hello
One more question Jasem, how do I rename the driver that I modify so that I still have the original.
How do I install the modified driver and with which file do I have to do it?

Thanks again.
1 month 3 weeks ago #76646

Please Log in or Create an account to join the conversation.

You can rename the source files, and then look for nightcrawel in CMakeLists.txt and just copy the section for it and rename everything accordingly.

Regarding the driver, you need to make it only inherit INDI::Rotator, so remove INDI::FocuserInterface and all the Focuser related functions and variables. Alternatively, you can create a new driver based off one of the existing Rotator drivers.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 month 3 weeks ago #76659

Please Log in or Create an account to join the conversation.

  • Posts: 197
  • Thank you received: 3
hello Jasem
so I'll try to modify the driver and remove the parts that I think are useless.
But where can I see the commands in the driver, that it sends to the arduino, because I need to find the "home" command of the rotator, and the command to give an angle from the serial terminal of the IDE, to control the modicication of the code without going through kstars for my tests.

And thank you for the link to the other rotator drivers, but is there also one online for the arduino.

Thanks again.
1 month 3 weeks ago #76661

Please Log in or Create an account to join the conversation.

  • Posts: 197
  • Thank you received: 3
sorry again,
but I didn't quite understand that
**
You can rename the source files, and then look for nightcrawel in CMakeLists.txt and just copy the section for it and rename everything accordingly.
**
what should I do?
I just have to find the files, copy them, modify and rename them ?
or do I have to make a new driver by modifying the original files ?
1 month 3 weeks ago #76662

Please Log in or Create an account to join the conversation.

You have two files, nightcrawler.h and .cpp. Copy them to something like myrotator.h and .cpp

In INDI CMakelists.txt, search for the nightcrawler section where it builds the executable. Just copy it and change the the source files and the executable (e.g. indi_myrotator_rotator). Also, edit drivers.xml and add an entry there for your rotator.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 month 3 weeks ago #76663

Please Log in or Create an account to join the conversation.

  • Posts: 197
  • Thank you received: 3
ok
so I'm copying and changing the names here for me
/home/christophe/Projects/indi/drivers/rotator
and the new file I can call "mynightcrawler" in h. and cpp.

but i can't find the way to get there
INDI CMakelists.txt

I'm sorry again for my ignorance on the subject
Christophe
1 month 3 weeks ago #76665

Please Log in or Create an account to join the conversation.

/home/christophe/Projects/indi/CMakeLists.txt

I suggest you download QtCreator and use it as your IDE.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 month 3 weeks ago #76668

Please Log in or Create an account to join the conversation.

  • Posts: 197
  • Thank you received: 3
hello
so this is where I need to edit

################ NightCrawler Focusing Rotator ################

SET(nightcrawler_SRC
${CMAKE_CURRENT_SOURCE_DIR}/drivers/rotator/nightcrawler.cpp) !!! here only ? !!!

add_executable(indi_nightcrawler_focus ${nightcrawler_SRC})
target_link_libraries(indi_nightcrawler_focus indidriver)
install(TARGETS indi_nightcrawler_focus RUNTIME DESTINATION bin)

I have just taken QTCreator, it seems to me much more complex to use, I will look at it and try to understand its functioning
Last edit: 1 month 3 weeks ago by Porchet.
1 month 3 weeks ago #76669

Please Log in or Create an account to join the conversation.

Time to create page: 0.896 seconds