Update port or baud rate

  • Posts: 38
  • Thank you received: 9

Replied by PDB on topic Update port or baud rate

I am reading the polulu guide, trying to understand what exactly needs to be sent. Will see if I can find a solution.

P
1 week 17 hours ago #34892

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

  • Posts: 38
  • Thank you received: 9

Replied by PDB on topic Update port or baud rate

Try this, it compiles and sends data but can't check the result.

change command back to

uint8_t command[6]

change write to :

if ( (rc = tty_write(PortFD, (char *) command, sizeof(command), &nbytes_written)) != TTY_OK)
{
tty_error_msg(rc, errstr, MAXRBUF);
DEBUGF(INDI::Logger::DBG_ERROR, "Init error: %s.", errstr);
}


Dont't forget to correct alst exit_safe_start (That was currently sending no data (i forgot to set the data byte) maybe that caused your problems.

uint8_t command[] = { 0x83 };
(and cast in tty_write)

I think INDI sets the terminal raw as needed to send this binary data. So hopefully that works. Binary data on a ttyport can be interrpreted as contol chars if not all tyy settings are correct.

Looking at the doc it seems you can read the motor position from the device, so you could read that periodically (Timerhit) and wait until correct position is reached before accepting new commands. (Some programming needed, but should be possible)

Looks like an interesting motor controller, maye I should buy one for myself.

Regards,

Paul
1 week 16 hours ago #34893

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

  • Posts: 38
  • Thank you received: 9

Replied by PDB on topic Update port or baud rate

I ordered one. Should arive tomorrow.

Paul
1 week 14 hours ago #34895

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

  • Posts: 280
  • Karma: 1
  • Thank you received: 27

Replied by HelgeMK on topic Update port or baud rate

Dear Paul, it is working now! I am really impressed, thank you very much once again for your support.

First, it did not work, then checked via the ticgui the status, and the motor needed to be re-energized (there is a button at the bottom of the GUI).

I uploaded the file in its latest version.

Best, Helge
1 week 3 hours ago #34919
Attachments:

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

  • Posts: 280
  • Karma: 1
  • Thank you received: 27

Replied by HelgeMK on topic Update port or baud rate

One more thing - tried different things to save the configuration for the port, in my case rfcomm1. Attchached the .cpp and .h file - but that did not work.

I hardly dare to ask again Paul - but in case weather conditions are again unfavorable, could you have a look? :-)
6 days 2 hours ago #34949
Attachments:

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

  • Posts: 38
  • Thank you received: 9

Replied by PDB on topic Update port or baud rate

Must be a conflict between the built-in save-routine and your declarations. (Did you use the "save" button in the options panel?

So if you want to save your extra items, try this:

in the .h file change:
virtual bool saveConfigItems(FILE *fp);
to
virtual bool saveConfigItems(FILE * fp) override;

in the c++ code add just before line 320:

INDI::Focuser::saveConfigItems(fp);

Rgrds,

Paul
The following user(s) said Thank You: HelgeMK
5 days 17 hours ago #34961

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

  • Posts: 280
  • Karma: 1
  • Thank you received: 27

Replied by HelgeMK on topic Update port or baud rate

Hi Paul, it works, I am really pleased - thank you once again!!

Attached just a picture of the TIC825 with the HC-05 module.
Last edit: 5 days 4 hours ago by HelgeMK.
5 days 5 hours ago #34979
Attachments:

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

  • Posts: 38
  • Thank you received: 9

Replied by PDB on topic Update port or baud rate

That looks very good. (got my tic yesterday and now trying to make a driver that talks directly to the tic over the usb port. Still have to decide if I go for that or put an arduino nano in between and make a moonlite compatible protocol) If I do direct USB the board is soo small it can be fixed to the motor (so no risc of blowing the 8825 driver when connecting/disconnecting the motor when the board is powered)

Paul
5 days 4 hours ago #34982

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

Time to create page: 0.645 seconds