Announcement

Collapse
No announcement yet.

Visi-Genie C and C++ libraries for custom MCU

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Visi-Genie C and C++ libraries for custom MCU

    Hi,

    For use with my own MCU (Microchip SAM) to interface with a 4D Systems display I see two possible libraries I could port:

    1. The old Arduino C++ library

    2. The newly added https://github.com/4dsystems/ViSi-Genie-C-Library

    Looking at them they seem quite different. Which one would you recommend regarding features and stability? To me it does not matter if it uses C or C++.

    Thanks in advance,

    Anguel

  • #2
    Hi Anguel,

    I would recommend using the new C library if you have no preference to C or C++. The new library is proven to be very stable and your system will benefit greatly from it's new code design

    I hope this helps

    Best regards

    Paul

    Comment


    • #3
      Thanks a lot, Paul. I actually expected it to be the other way round because the Arduino library exists for a long time ;-)
      Do you have some more extensive examples for using the C library? E.g. with multiple screens and a finite state machine architecture? That would really help.

      Comment


      • #4
        Hi Anguel,

        I will ask the team if we have any other suitable examples.

        Best regards

        Paul

        Comment


        • #5
          Thanks a lot, this would be great.
          I just want to double check that the new C library is regarded as production-ready, I see all those BETA hints in the code...

          Comment


          • #6
            Hi Anguel,

            The new C library has been extensively tested so you can be assured of it's functionality and is regarded as production-ready. As with all new libraries, we welcome any feedback during it's initial use so we can constantly improve them.

            I will update you as soon as new examples become available.

            Best regards

            Paul

            Comment


            • #7
              Hello,

              Are there any updates here regarding some bigger real-world example using the C library?
              Unfortunately, there was no further feedback :-(

              Thanks,
              Anguel

              Comment


              • #8
                Hi Anguel,

                There are no new real world examples as yet but I will keep you updated as soon as some are available.

                Best regards

                Paul

                Comment


                • #9
                  Phew! I had a closer look at the 4D Arduino C++ and C libraries and non of these look like they can be put in a product without a lot of testing, debugging and rework. The code looks complex in parts, but there are no good comments at important parts or parts are commented out like someone was not sure if they work or not or has not tested them to the end. Comments like "beta" or "Untested, will need work I'm sure" don't look promising at all. Also the C library you say is tested and proven has such code and looks more like trial and error programming in parts. It also uses blocking polling techniques that are not only problematic but additionally use timing variables that may overflow and such overflows are not handled at all.

                  Even the basic display reset timing in the Arduino C++ vs C library seems to be different for some reason.
                  Also, what is exactly the difference between the Visi-Genie-Arduino and Visi-Genie-Arduino-BETA library? They seem to have the same changelogs at the beginning but differ significantly.

                  I must say I am confused and disappointed because I don't know if I will be able to ever make this code work in a stable product.

                  Anguel

                  Comment


                  • #10
                    Any update? It looks like there are incorrect variable types used, functions that return uint8_t bytes but also return -1 on errors (= 0xFF byte), functions that take uint16_t and send it out as a single byte, and a lot more of that stuff. Looks like the bugs come from the original Arduino Visi Genie library which has just been ported to C without further debugging. The code is really complex and confusing in parts, missing comments, dangerous pitfalls, I have no real idea what is going on in some parts like autoPing, some functions don't even get called or return values are never checked.

                    So IMHO it needs real experts to improve the code, otherwise I consider it dangerous to use. Maybe it just needs a complete rewrite.This should not take more than a week or two but IMHO you need people who really have a lot of embedded C experience. No wonder that I read so many posts where displays just hang after many hours working without problem.

                    Additionally, the STM32 demo seems to trigger some internal HAL busy lockups / known issues. But this looks like another problem.

                    IMHO you should be interested in giving a 100% working library to be used by your customers, especially inexperienced ones. Sorry, but I am disappointed because I wasted multiple days to guess what the code does and to find out that it has all those problems.

                    Comment


                    • #11
                      Hi,

                      The C library which as you correctly say is ported over from the Arduino library is intended as a non hardware specific library. As you know there are many micro-controllers and no possible way to make specific C libraries for every one nor is it possible to test on every micro-controller.genieArduino library has been in use since 2013 and used by a huge amount of customers in production environments without issue and while there may be some issues that don't normally come to light until after release because they have no functional impact it is only by useful feedback that we may be aware. It is very likely that the initial library was created on a 16bit micro-controller and then ported to the Arduino which might be the reason for some of the uint16_t variables being retained. Using a uint16_t instead of uint8_t isn't a bug, many modern micro-controllers often take longer to process a uint8_t than a uint16_t

                      The posts you have read about displays just hang after many hours of working typically relate to other factors and not to the bugs in the library. Any bugs we are made aware of are fixed immediately.

                      The C library is offered as open source so that users are welcome to modify or fork to suit their needs. Looking at Github it has only been forked once without modification.

                      We try to provide libraries for the most popular micro-controllers and a lot of work was put into the genieArduio library and the port to C to remove the complexity in customer code which it does very well and is no more complex than most Arduino/C libraries that have built in event handlers.

                      However, I will look into this and see what can be done assuming it has no impact or backward compatibilty issues for the many customers that successfully use the Genie-Arduino library. It would be helpful if you could supply me with a full detailed list of the other mistakes that you have found in the library so we can assess them also but since the library has been successfully used since 2013 there is no point on re-writing a library that has proven to work so well.

                      Best regards

                      Paul

                      Comment

                      Working...
                      X