[Kstars-devel] kdeedu/kstars/kstars/indi/fli

Gaetano Vocca yagvoc-web at yahoo.it
Sun Apr 24 17:33:12 CEST 2005


Adriaan,
I agree with you that this code, as it was, was not portable to other OSes 
but, simply removing the #define USB_RESET I think you break the behaviour 
under Linux. So, instead of just deleting the line it is better to test 
whether Linux is the current OS and then define USB_RESET.
Unfortunately, from the test I have performed, you will not be able to 
reconnect to a fli device without a reset.
As soon as I will be able to compile the CVS kstars again, I will try to fix 
it but, in the meanwhile my feeling is that it is better to keep the reset.
Comments are welcome

BR
Gaetano

On Saturday 23 April 2005 23:52, Adriaan de Groot wrote:
> CVS commit by adridg:
>
> Unconditionally using a OS-specific function (the name
> suggests that, at least) seems like a bad idea. This commit
> may break functionality, because it might remove the
> linux_usb_reset() call even under linux (I don't know where
> USB_RESET might otherwise be defined).
>
> CCMAIL: kstars-devel at kde.org
>
>
>   M +3 -1      libfli-sys.c   1.4
>
>
> --- kdeedu/kstars/kstars/indi/fli/libfli-sys.c  #1.3:1.4
> @@ -73,5 +73,8 @@ static long unix_fli_list_usb(flidomain_
>  static long unix_fli_list_serial(flidomain_t domain, char ***names);
>
> +#ifdef USB_RESET
> +/* Dodgy OS-specific code. */
>  long linux_usb_reset(flidev_t dev);
> +#endif
>
>  long unix_fli_connect(flidev_t dev, char *name, long domain)
> @@ -173,5 +176,4 @@ long unix_fli_disconnect(flidev_t dev)
>    CHKDEVICE(dev);
>
> -#define USB_RESET
>  #ifdef USB_RESET
>    if ((DEVICE->domain & 0x00ff) == FLIDOMAIN_USB) {
>
>
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel


More information about the Kstars-devel mailing list