Quantcast
Channel: fritzing forum - Latest posts
Viewing all 31258 articles
Browse latest View live

Compiler problem: switch statement

$
0
0

Hi Guys This is Ayesha It has been long time that I’m working on a project of arduino and I have searched my question here and there but couldn’t find it. Well let me explain the issue I’m getting with my arduino switch and its timing.

I believe the arduino that I got from an online electronic store as i think it’s SWITCH statement has some compile time problems.

If I try to declare a boolean variable in a CASE statement as illustrated in "case 2: in the snippet below, the compiler throws an error.

I add this to the other CASE statement problem I flagged earlier: ie. the compiler does not throw an error if you misspell “default” as “defalut.”)

CODE

switch (var) {
case 1:
//do something when var equals 1
break;
case 2:
boolean X;
//do something when var equals 2
break;
default:
// if nothing else matches, do the default
// default is optional
break;
}

This appears to be a problem with the compiler, NOT my code, and it seems to happen only with nested SWITCH statements.

Thank in advance for your prompt response


IC Component CReation

$
0
0

Peter

Thanks. I will give it a try.

Ian

Update window to high

$
0
0

I have fritzing installed on Ubuntu 18.04.01. It is version 0.9.3(b04.19). When it comes up it is way to big for my 32 inch monitor and it cannot be resized to reduce it’s size to a useable format.
This problem seems to have been around for a while.
Any suggestions?

Thanks.
Glenn.

Update window to high

$
0
0

Some of the things people have tried over the years in the issues on github referred to here may (or may not) help. Otherwise you would have to see if it gets fixed in 9.5 (don’t know of a release date for 9.5.)

Peter

Compiler problem: switch statement

$
0
0

While you would be better to ask this in an Arduino or C++ forum rather than here, this is not likely a hardware problem but a coding error (the Arduino is not involved at compile time.) Try this to make the declare a compound statement:

case 2: {

boolean X;
// do something with X
}

and see if that compiles. Note X will disappear when you exit that part of the case statement as it is local to the compound statement.

Peter

IC Component CReation

$
0
0

Peter
I was able to change the files you indicated. How do I put them back into a .FZPZ zip file?

Thanks

Ian

IC Component CReation

$
0
0

Just zip them (I typically use 7zip) and change the trailing .zip to .fzpz and you should be away.

Peter

No network drives 0.9.4

$
0
0

Not an issue on my machine: Windows 10 - Fritzing build Version 0.9.4 (CD-498-0-a1ffcea 2019-12-01) 64 [Qt 5.12.3]

It’s a samba fileshare connected to a linksys router linked to (ziggo) modem.


Parts won't drop into editor

$
0
0

I am also seeing the same behavior (parts won’t drop) and messages identical to these (I can run wires but not drop components)

I am running Fedora 31 (with qt5-qtbase-5.13.2-2.fc31.x86_64 installed). I used the OS Software library tool to install Fritzing 0.9.2b-19.fc31. I know how to install from source, but I just wanted to a quick scribble-up of a breadboard and a couple of CMOS ICs and didn’t want to go through the entire from-scratch process.

Since I see numerous messages about Weyland and I see at least one other poster here is running Fedora 31, I have to wonder about Qt and Weyland compatibility issues here.

Here’s a stdout capture from my session where I started Fritzing, opened a new project, then tried to place a resistor and one IC (Atmel processor).

QSocketNotifier: Can only be used with threads started with QThread
libpng warning: iCCP: known incorrect sRGB profile
[ message repeats 27 times ]
QWaylandShmBuffer: mmap failed (Invalid argument)
[ message repeats 274 times ]
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
QWaylandShmBuffer: mmap failed (Invalid argument)
[ message repeats 19 times ]
libpng warning: iCCP: known incorrect sRGB profile

Hundreds of mmap failures in less than 30 seconds.

The error message is likely coming from here…

https://code.qt.io/cgit/qt/qtwayland.git/tree/src/client/qwaylandshmbackingstore.cpp

    // map ourselves: QFile::map() will unmap when the object is destroyed,
    // but we want this mapping to persist (unmapping in destructor)
    uchar *data = (uchar *)
            mmap(nullptr, alloc, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
    if (data == (uchar *) MAP_FAILED) {
        qErrnoWarning("QWaylandShmBuffer: mmap failed");
        return;
    }

It works if I run Fritzing as root:

$ sudo Fritzing
libpng warning: iCCP: known incorrect sRGB profile

[ and only the libpng warning, none of the Wayland messages ]

IC Component CReation

$
0
0

Peter

I have created the part for PIC241FJ128GA204 TQFP. I have provided this as an attachment in case others may want to use it. I used Inkscape and my first attempt did not work when tried to copy some sections and paste. It appears that you need to edit the actual components or they don’t show up in the final part.
If there is a way around this then let me know as it takes a good amount of time to edit every component of the image.

Thanks
Ian

IC Component CReation

Build instructions for Linux and Windows

$
0
0

After 2 evenings trying to set things up, i’ve done it! I’ve been able to build 0.9.4 on my Windows 10 machine :smiley: :rofl:

Some steps have changed so i’ll make some notes and post them here

3-pin DC motor 5V

IC Component CReation

$
0
0

The part looks not bad, check part is happy enough other than the there is a transform in copper1. It can likely be removed by ungrouping copper1 and regrouping it (the ungroup usually removes translates.) Schematic is strange. It is not loading the correct svg for some reason, and I don’t know where it is getting the one it is loading. Fritzing looks like this:

Capture

where the text is in the wrong place and the pins are .2 in wide instead of .1in. The svg looks correct:

Capture1

there isn’t a conflicting svg in core parts so I don’t know why this is happening, I will have to poke further at it.

Peter

No network drives 0.9.4

$
0
0

Thanks, from the lack of other complaints, I suspect there is an issue on the original poster’s machine, but I’m not sure what that is as Fritzing just uses the file system and (AFAIK) doesn’t know if files are local or on the network.

Peter


Parts won't drop into editor

$
0
0

This looks like part of the install got done as root. I’d suggest removing the install and renaming the user directories (on linux those are in

~/Documents/Fritzing/parts
~/.config/Fritzing

and contain your mine parts bin if you have things in it.) I would also install 0.9.4 which is the latest release as 0.9.2 is 2 releases ago. The install should be done without sudo so all the files are writable by the user ID you run Fritzing from. If there are still problems the best bet is to open an issue on github here:

Peter

No network drives 0.9.4

$
0
0

I just tried this morning.

It seems that the problem has not occured now.

Strange because i had the problem in the beginning.

But - zufallig - i had 3 days ago a new linux fileserver which i’m connected to, maybe a problem with the previous server …

Parts won't drop into editor

$
0
0

I did the install through the standard Fedora Software tool. The version that was available was 0.9.2. I know it’s old, but it’s what available in the Fedora “app store”.

I did a ‘find ~ -user root’ and none of my files anywhere are owned by root. They are all my files. I get that permissions on Fritzing config and file parts can screw things up but that’s not happening here. What’s happening appears to be Qt5 failures to secure shared memory access with Wayland, not app failures.

There are structural differences between writing an app for X and writing an app for Wayland. It would have been nice if source backwards-compatibility was a goal, but they really wanted to tear things down and start over, so you can’t just “port” the app by changing some includes and recompiling.

If you cannot install Fritzing from a package because that screws up permissions, then the fault is with the .spec file not the app. Packaging installs is not new. It’s not reasonable to tell all users “just build from source”.

In terms of this exact bug, I’m about to put Fedora 31 aside because I’m also having problems with the Displaylink adapter kernel module. It’s probably that 5.4 is too bleeding edge for the amount of effort I want to put into making things work. I’ve grabbed Fedora 30 (six months older) and we’ll see if things are happier there.

I’ve been working with Open Source for decades. I contribute to multiple projects. For this, I just want to scribble down a breadboard layout or two - I already use EagleCAD and KiCAD for serious schematic capture and PCB ordering. I am literally only using Fritzing because I want some breadboard graphics.

Parts won't drop into editor

$
0
0

If you are willing to install outside the app store I’d probably suggest 0.9.3b as it loads everything it wants from the zip file. The 0.9.4 release (which is a completely new tool chain) does not so far although I’m hoping we will go back to that in 0.9.5. However for what you appear to want 0.9.2 should do just fine. You may need to install the parts repository as some of the installer versions don’t have it as a prereq and if it isn’t installed Fritzing won’t run correctly.

Peter

Build instructions for Linux and Windows

$
0
0

Updated build steps derived from the ones provided by @vanepp

Download and install MSVS 2015
If you have MSVS 2017 it might not work, so I uninstalled it. It’s unclear to me how it does with 2019
https://visualstudio.microsoft.com/vs/older-downloads/

Download and install QT using the installer
https://www.qt.io/download-qt-installer
You’ll need to create an account to be able to download.
During the installation process you will be asked which version and components need to be installed.
I believe the latest official build was created using QT 5.12 so I downloaded the latest stable version which is 5.12.7
Under the version select:
MSVC 2015 64-BIT
All components starting with QT
Under Developers and designer tools
QT Creator (4.11.1 CBD Debugger support
Debugging tools for windows
Mingw 7.3.0 64-BIT (not sure if you really need this)
CMake 3.16.0 64BIT
Complete the installation process

	Any missed components can be added later by going to windows 'Add/Remove programs'. Search for the QT program and click 'Modify'. 
	This will allow you to add or remove components if required. (for me this was far from clear)

Download and install GIT if you haven’t done that (shame on you) https://git-scm.com/downloads

Create a fritizng application folder for example C:\sources\ where we will place all programs, dependencies en sources.

Install VCPKG. this is a package manager which w’ll use to download and build/install 2 libraries which are required to build libgit2, which is required to build Fritzing.
Download and install VCPKG into fritzing application folder as following:
Open ‘VS2015 x64 Native Tools Command prompt’ via Windows Start Menu. DO NOT USE NORMAL CMD.
cd to fritzing application folder
cd C:\sources
clone the vcpkg repositry
git clone https://github.com/Microsoft/vcpkg
Run the bootstrapper in the root folder (of the repository):
bootstrap-vcpkg.bat (Windows)
This will install vcpkg

Build and install openssl using VCPKG
Open VS2015 x64 Native Tools Command prompt. DO NOT USE NORMAL CMD prompt.
cd to vcpkg folder
run:
vcpkg install --triplet x64-windows openssl

Build and install libssh2 using VCPKG
Open VS2015 x64 Native Tools Command prompt. DO NOT USE NORMAL CMD prompt.
cd to vcpkg folder
run:
vcpkg install --triplet x64-windows libssh2

You will now have OpenSSL and LibSSH2 available in your C:\sources\VCPKG\installed folder
We’ll need to add an environment variable to refer to the libssh and openssl libraries so that it can be used to build libgit2

set LIBSSH2_ROOT=C:\sources\vcpkg\installed\x64-windows

Build and install libgit2 using cmake
In browser go to:
https://github.com/libgit2/libgit2/releases
Download the source code for the latest release version (zip or tar archive)
Unzip into the application folder; ie.
C:\sources\libgit2-0.28.4>

open the file CMakelist.txt with your favorite text editor (notepad++)
After the option definitations add the following line: 
	find_package(LIBSSH2)
In libgit2-0.28.4 directory create a new directory called 'build':
	mkdir build
change directory to 'build' directory
	cd build	
run	to build from build directory
	cmake -G “Visual Studio 14 Win64” ..
When it's done, you should see the following enabled features. It might complain about http-parser, ignore that.
-- Enabled features:
 * threadsafe, threadsafe support
 * HTTPS, using WinHTTP
 * SHA, using CollisionDetection
 * http-parser, http-parser support (bundled)
 * zlib, using system zlib
 * SSH, SSH transport support

Fritzing will search this library in a sibling folder. (one level higher). We will move the required files to this folder
create a directory called C:\sources\libgit2
create a direcotory called C:\sources\libgit2\build64
create a direcotory called C:\sources\libgit2\build64\Release
copy all files from the C:\sources\libgit2-0.26.0\build\Debug folder into the previously created ‘Release’ folder.
Copy the complete C:\sources\libgit2-0.28.4\include folder (including the include folder) into ‘C:\sources\libgit2’.
This should result in ‘C:\sources\libgit2\include’ having some files and folders.

We'll also need to manually copy the openSsl and LibSSH2 libraries to the newly create libgit2 folder.
copy all the files from C:\sources\vcpkg\installed\x64-windows\bin\* into the C:\sources\libgit2\build64 folder. 

We now should have all pre-requisites available to starts with actual work with Fritizng.

Download FRITZING_APP source code in to fritzing application folder
cd C:\sources
git clone https://github.com/fritzing/fritzing-app.git

Download FRITZING_PARTS repositry in to fritzing application folder
cd C:\sources
git clone https://github.com/fritzing/fritzing-parts.git

Download Boost, unzip it into C:\sources\fritzing-app\lib folder
https://sourceforge.net/projects/boost/files/boost-binaries/

Start QT Creator
Open File or project; go to your Fritzing-App folder and open the project file called ‘phoenix.pro’
Configure it to use QT 5.12.7 MSVC2015 64BIT
Once the configuration is accepted, it will analyse the project
In the bottom console called ‘General Messages’ you should see something like the following:

Project MESSAGE: target arch: x86_64
Project MESSAGE: found libgit2 include path at C:/sources/fritzing-app/../libgit2/include
Project MESSAGE: found libgit2 library in C:/sources/fritzing-app/../libgit2/build64/Release
Project MESSAGE: 
Project MESSAGE: using boost_1_72_0
Project MESSAGE: libs -LC:/sources/fritzing-app/../libgit2/build64/Release -lgit2
Project MESSAGE: target arch: x86_64
Project MESSAGE: found libgit2 include path at C:/sources/fritzing-app/../libgit2/include
Project MESSAGE: found libgit2 library in C:/sources/fritzing-app/../libgit2/build64/Release
Project MESSAGE: 
Project MESSAGE: using boost_1_72_0
Project MESSAGE: libs -LC:/sources/fritzing-app/../libgit2/build64/Release -lgit2

If you see a different target architecture, then you didn’t configure the project properly.
I initially used MINGW 64Bit and it gave me all kinds of errors and didn’t identify my system as 64bit. So I had to uninstall MINGW via the QT Modify option (see above) and install the MSVC2015 stuff.

Now you should be able to hit Run and the application should compile / run.

Viewing all 31258 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>