← Back to team overview

kicad-developers team mailing list archive

Re: Unfolding a bus....

 

Hi Jeff,
Thanks for cranking through all these features!  It's quite impressive
seeing the progress :-)

I gave bus unfolding a try and noticed a few issues:

1) It looks like in your branch, bus unfolding is only possible while
already in the "draw bus" tool.  It was originally intended to be something
that you could trigger from a selected bus, just like the other immediate
commands (move/rotate/etc)

2) When I start unfolding a bus, I get the following assertion when I place
the bus label:
eeschema/tools/sch_line_drawing_tool.cpp(561): assert "aType == LAYER_WIRE"
failed in doDrawSegments().
I think this is because the doDrawSegments() of the "draw bus" tool is
still called even after the unfold starts (and another doDrawSegments is
running to place the unfolded wires)

3) The keyboard shortcut doesn't seem to do anything anymore, I can only
unfold from the context menu.  Does it work for you?

Unfortunately I don't have time tonight to look more closely at any of
these issues, but I can look at them tomorrow if you don't find them first.

I like your implementation of BUS_UNFOLD_MENU to handle the dynamic checks
-- this pattern will probably be useful for other things in the future!

Best,
Jon

On Thu, May 2, 2019 at 4:05 PM Jeff Young <jeff@xxxxxxxxx> wrote:

> Bits pushed.
>
> Main parts are now in sch_line_drawing_tool.cpp.  BUS_UNFOLD_MENU starts
> on line 96, it’s added to the context menu at line 222, and the commands
> are dispatched starting at line 674.
>
> BTW: there are some synthetic KICAD_T types that can be used for fishing
> out sub-types of KICAD_T.  Of interest will be SCH_LINE_LOCATE_BUS_T and
> SCH_LINE_LOCATE_WIRE_T.  (There have been similar ones for reference,
> value, footprint and datasheet SCH_FIELD_Ts for some time.)
>
> Cheers,
> Jeff.
>
> On 2 May 2019, at 20:41, Jeff Young <jeff@xxxxxxxxx> wrote:
>
> (I also got my simple test working by renaming my bus label from "D0..31"
> to "D[0..31]”.)
>
> On 2 May 2019, at 20:39, Jeff Young <jeff@xxxxxxxxx> wrote:
>
> Ha!  Works right out of the box.
>
> I’ll push it to origin/eemodern shortly so you can have a look.
>
> Cheers,
> Jeff.
>
>
> On 2 May 2019, at 20:07, Jon Evans <jon@xxxxxxxxxxxxx> wrote:
>
> Hi Jeff,
> You can test unfolding using one of the demo projects that uses buses (for
> example: video)
>
> -Jon
>
> On Thu, May 2, 2019 at 2:57 PM Jeff Young <jeff@xxxxxxxxx> wrote:
>
>> Hi Jon,
>>
>> I’ve moved the bus unfolding menu to the modern toolkit and I’m trying to
>> test it.  How do I give a bus connections?  I tried a wire2bus entry with a
>> label on the wire, and connecting the wire to an annotated component, and
>> giving the bus a label of “D0..D31”, but none of those worked.  (Or one of
>> them did but I’ve got a bug somewhere.)
>>
>> Thanks,
>> Jeff.
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
>

Follow ups

References